diff --git a/test/arith.ltn b/test/arith.ltn index 965a974a..10342a65 100644 --- a/test/arith.ltn +++ b/test/arith.ltn @@ -98,7 +98,6 @@ namespace test { return test_all_cases("Divide/", div, cases) + test_all_cases("Divide/=", div_eq, cases); - } @@ -125,6 +124,36 @@ namespace test { test_all_cases("Modulo%=", mod_eq, cases); } + function shift_l() { + var cases = [ + [[1, 1], 2], + [[2, 2], 8], + ]; + + var shift = lambda (a, b) { + return a << b; + }; + + return + test_all_cases("Shift l<<", shift, cases); + } + + function shift_r() { + var cases = [ + [[1, 1], 0], + [[2, 1], 1], + [[8, 2], 2], + ]; + + var shift = lambda (a, b) { + return a >> b; + }; + + return + test_all_cases("Shift l<<", shift, cases); + } + + function neg() { var cases = [ @@ -143,6 +172,8 @@ namespace test { function arith() { - return add() + sub() + mlt() + div() + mod() + neg(); + return + add() + sub() + mlt() + div() + mod() + neg() + + shift_l() + shift_r(); } } \ No newline at end of file diff --git a/test/exception.ltn b/test/exception.ltn index 29caadd4..8b59c007 100644 --- a/test/exception.ltn +++ b/test/exception.ltn @@ -30,8 +30,8 @@ namespace test { }; var cases1 = [ - [[ &just_throw(), [] ], true], - [[ &no_throw(), [] ], false], + [[ &just_throw(), [] ], true], + [[ &no_throw(), [] ], false], [[ &std::remove_back(_), [std::array()] ], true], [[ &std::remove_back(_), [std::array(42)] ], false], [[ throws, [1,2] ], true],