File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,10 @@ public class {{ testClass }}
88 public void { { test.testMethod } }()
99 {
1010 {{- if test.expected.error } }
11- Assert.Throws<InvalidOperationException >(() => { { testedClass } }.{ { test.testedMethod } }({ { test.input.instructions } }));
11+ Assert.Throws<{ { if test.expected.error == " divide by zero" } }DivideByZeroException{ { else } }InvalidOperationException{ { end } }>(() => { { testedClass } }.{ { test.testedMethod } }({ { test.input.instructions } }));
12+ { { else if test.property == " evaluateBoth" } }
13+ Assert.Equal("{ {test.expected[0] | array.join " " } }", { { testedClass } }.Evaluate({ { test.input.instructionsFirst } }));
14+ Assert.Equal("{ {test.expected[1] | array.join " " } }", { { testedClass } }.Evaluate({ { test.input.instructionsSecond } }));
1215 { { else } }
1316 Assert.Equal("{ {test.expected | array.join " " } }", { { testedClass } }.{ { test.testedMethod } }({ { test.input.instructions } }));
1417 { { end -} }
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ public void Division_performs_integer_division()
102102 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
103103 public void Division_errors_if_dividing_by_zero ( )
104104 {
105- Assert . Throws < InvalidOperationException > ( ( ) => Forth . Evaluate ( [ "4 0 /" ] ) ) ;
105+ Assert . Throws < DivideByZeroException > ( ( ) => Forth . Evaluate ( [ "4 0 /" ] ) ) ;
106106 }
107107
108108 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
@@ -294,7 +294,8 @@ public void User_defined_words_errors_if_executing_a_non_existent_word()
294294 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
295295 public void User_defined_words_only_defines_locally ( )
296296 {
297- Assert . Equal ( "[0] [2]" , Forth . EvaluateBoth ( ) ) ;
297+ Assert . Equal ( "0" , Forth . Evaluate ( [ ": + - ;" , "1 1 +" ] ) ) ;
298+ Assert . Equal ( "2" , Forth . Evaluate ( [ "1 1 +" ] ) ) ;
298299 }
299300
300301 [ Fact ( Skip = "Remove this Skip property to run this test" ) ]
You can’t perform that action at this time.
0 commit comments