Fixing 4.x grammar to be backward compatible.
Added 3.x unit tests back to show this.
This commit is contained in:
@@ -18,7 +18,7 @@ assert_equal(test_function, test_function);
|
||||
|
||||
assert_not_equal(test_function, `+`);
|
||||
|
||||
assert_equal(test_function.call({1}), 1);
|
||||
assert_equal(test_function.call([1]), 1);
|
||||
|
||||
// dynamic object function tests
|
||||
|
||||
@@ -67,10 +67,10 @@ auto group = group_guard.get_contained_functions();
|
||||
assert_equal(true, group[0].has_guard())
|
||||
assert_equal(false, group[1].has_guard())
|
||||
|
||||
assert_throws("Function does not have a guard", []() { group[0].get_guard(); } );
|
||||
assert_throws("Function does not have a guard", []() { without_guard.get_guard(); } );
|
||||
assert_throws("Function does not have a guard", fun() { group[0].get_guard(); } );
|
||||
assert_throws("Function does not have a guard", fun() { without_guard.get_guard(); } );
|
||||
|
||||
auto guard = with_guard.get_guard();
|
||||
|
||||
assert_equal(false, guard.has_guard());
|
||||
assert_throws("Function does not have a guard", []() { guard.get_guard(); } );
|
||||
assert_throws("Function does not have a guard", fun() { guard.get_guard(); } );
|
||||
|
Reference in New Issue
Block a user