Ran clang-format across all files
This commit is contained in:
1 parent
a27321df2e
commit
8f21a77150
1123 files changed
+159414
-162346
No files matched your search
Executable → Regular
+23
-21
@@ -97,8 +97,8 @@
|
||||
|
||||
// void simple_operator_test()
|
||||
// {
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new EvaluatesToFoo()));
|
||||
// test_assert(e.eval("!!true"));
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new
|
||||
// EvaluatesToFoo())); test_assert(e.eval("!!true"));
|
||||
// test_assert(e.eval("3 == 3"));
|
||||
// test_assert(e.eval("4 > 3"));
|
||||
// test_assert(e.eval("3 < 6"));
|
||||
@@ -113,43 +113,46 @@
|
||||
|
||||
// void test_bool_conversion()
|
||||
// {
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new EvaluatesToFoo()));
|
||||
// test_assert(e.eval("true"));
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new
|
||||
// EvaluatesToFoo())); test_assert(e.eval("true"));
|
||||
// test_assert(e.eval("1"));
|
||||
// test_assert(e.eval("1.5"));
|
||||
// test_assert(e.eval("'true string'"));
|
||||
// //test_assert(e.eval("[1,2,3]")); // list not valid here - only after "in"
|
||||
// test_assert(e.eval("Foo.x"));
|
||||
// //test_assert(e.eval("[1,2,3]")); // list not valid here - only
|
||||
// after "in" test_assert(e.eval("Foo.x"));
|
||||
// test_assert(e.eval("Foo.list"));
|
||||
// test_assert(!e.eval("''"));
|
||||
// }
|
||||
|
||||
// void property_validator_test()
|
||||
// {
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new EvaluatesToFoo()));
|
||||
// test_assert(e.check_valid("Foo.bar == 'Foo' or 'x' in [Foo.x, Foo.y, 'z']", nullptr));
|
||||
// std::string bad_property;
|
||||
// test_assert(!e.check_valid("Foo.bar == 'Foo' or 'x' in [Fuu.x, Foo.y, 'z']", &bad_property));
|
||||
// test_assert(bad_property == "Fuu.x");
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new
|
||||
// EvaluatesToFoo())); test_assert(e.check_valid("Foo.bar == 'Foo' or
|
||||
// 'x' in [Foo.x, Foo.y, 'z']", nullptr)); std::string bad_property;
|
||||
// test_assert(!e.check_valid("Foo.bar == 'Foo' or 'x' in [Fuu.x,
|
||||
// Foo.y, 'z']", &bad_property)); test_assert(bad_property == "Fuu.x");
|
||||
// }
|
||||
|
||||
// void more_complex_test()
|
||||
// {
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new EvaluatesToFoo()));
|
||||
// ExpressionEvaluator e(BTS_SharedPtr<IPropertyEvaluator> (new
|
||||
// EvaluatesToFoo()));
|
||||
|
||||
// test_assert(e.eval("Foo.bar == 'Foo' and 'b' in ['a', 'b', 'c', Foo.bar]"));
|
||||
// test_assert(e.eval("Foo.number > 2 or (3.5 <= 7 and Foo.number == 3) or 'x' in ['a', 'b', 'c']"));
|
||||
// test_assert(!e.eval("(3.5 <= 7 and Foo.number == 3) or 'x' in ['a', 'b', 'c']"));
|
||||
// test_assert(e.eval("'foo' in Foo.list and Foo.number == 42.0"));
|
||||
// test_assert(e.eval("!!('oo' in Foo.foo)"));
|
||||
// test_assert(e.eval("Foo.bar == 'Foo' and 'b' in ['a', 'b', 'c',
|
||||
// Foo.bar]")); test_assert(e.eval("Foo.number > 2 or (3.5 <= 7 and
|
||||
// Foo.number == 3) or 'x' in ['a', 'b', 'c']"));
|
||||
// test_assert(!e.eval("(3.5 <= 7 and Foo.number == 3) or 'x' in ['a',
|
||||
// 'b', 'c']")); test_assert(e.eval("'foo' in Foo.list and Foo.number
|
||||
// == 42.0")); test_assert(e.eval("!!('oo' in Foo.foo)"));
|
||||
// test_assert(e.eval("!('ooo' in Foo.foo)"));
|
||||
// test_assert(e.eval("!false in [false, false, false, false, true, Foo.bool]"));
|
||||
// test_assert(e.eval("!false in [false, false, false, false, true,
|
||||
// Foo.bool]"));
|
||||
// }
|
||||
|
||||
// void recursive_test()
|
||||
// {
|
||||
// BTS_SharedPtr<EvaluatesRecursively> badprops (new EvaluatesRecursively());
|
||||
// ExpressionEvaluator e(badprops);
|
||||
// BTS_SharedPtr<EvaluatesRecursively> badprops (new
|
||||
// EvaluatesRecursively()); ExpressionEvaluator e(badprops);
|
||||
// badprops->set_evaluator(&e);
|
||||
|
||||
// // Try to get the 'fuzzy'property recursively
|
||||
@@ -167,7 +170,6 @@
|
||||
|
||||
// };
|
||||
|
||||
|
||||
// BEGIN_TEST_SUITE(expression_tests)
|
||||
// ADD_TEST(simple_operator_test);
|
||||
// ADD_TEST(test_bool_conversion);
|
||||
|
||||
Reference in new issue
Block a user