Fixing 4.x grammar to be backward compatible.

Added 3.x unit tests back to show this.
This commit is contained in:
Jonathan Turner
2012-05-17 10:14:50 -07:00
parent 4674594ee7
commit c73f16fdfe
211 changed files with 1769 additions and 86 deletions

View File

@@ -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(); } );