diff options
Diffstat (limited to 'tests/manual/cplusplus')
-rw-r--r-- | tests/manual/cplusplus/tests/t1.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/manual/cplusplus/tests/t1.cpp b/tests/manual/cplusplus/tests/t1.cpp index 362146fc19..75c4666d55 100644 --- a/tests/manual/cplusplus/tests/t1.cpp +++ b/tests/manual/cplusplus/tests/t1.cpp @@ -2,7 +2,9 @@ class Class { int a, b; - enum zoo { a, b }; + enum zoo { a = 1, b = a + 2 + x::y<10>::value }; + + enum {}; typedef enum { k }; @@ -12,5 +14,11 @@ class Class { void another_foo() { int a = static_cast<int>(1+2/3*4-5%6+(7&8)); } + + void test_if() { + if (a == 10) return 1; + else if (b == 20) return 2; + else if (c == 30) { x = 1; } + } }; |