Skip to content

Commit

Permalink
rpn-calculator: Test missing operands & intermediate error (exercism#…
Browse files Browse the repository at this point in the history
  • Loading branch information
pvkv1799 authored Nov 19, 2021
1 parent ed971fe commit 41841de
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions exercises/concept/rpn-calculator/tests/rpn-calculator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,17 @@ fn test_too_many_operands_returns_none() {
let input = calculator_input("2 2");
assert_eq!(evaluate(&input), None);
}

#[test]
#[ignore]
fn test_zero_operands_returns_none() {
let input = calculator_input("+");
assert_eq!(evaluate(&input), None);
}

#[test]
#[ignore]
fn test_intermediate_error_returns_none() {
let input = calculator_input("+ 2 2 *");
assert_eq!(evaluate(&input), None);
}

0 comments on commit 41841de

Please sign in to comment.