| 6515 | } |
| 6516 | |
| 6517 | void enum8() { |
| 6518 | GET_SYMBOL_DB("enum E { X0 = x, X1, X2 = 2, X3, X4 = y, X5 };\n"); |
| 6519 | ASSERT(db != nullptr); |
| 6520 | const Enumerator *X0 = db->scopeList.back().findEnumerator("X0"); |
| 6521 | ASSERT(X0); |
| 6522 | ASSERT(!X0->value_known); |
| 6523 | const Enumerator *X1 = db->scopeList.back().findEnumerator("X1"); |
| 6524 | ASSERT(X1); |
| 6525 | ASSERT(!X1->value_known); |
| 6526 | const Enumerator *X2 = db->scopeList.back().findEnumerator("X2"); |
| 6527 | ASSERT(X2); |
| 6528 | ASSERT(X2->value_known); |
| 6529 | ASSERT_EQUALS(X2->value, 2); |
| 6530 | const Enumerator *X3 = db->scopeList.back().findEnumerator("X3"); |
| 6531 | ASSERT(X3); |
| 6532 | ASSERT(X3->value_known); |
| 6533 | ASSERT_EQUALS(X3->value, 3); |
| 6534 | const Enumerator *X4 = db->scopeList.back().findEnumerator("X4"); |
| 6535 | ASSERT(X4); |
| 6536 | ASSERT(!X4->value_known); |
| 6537 | const Enumerator *X5 = db->scopeList.back().findEnumerator("X5"); |
| 6538 | ASSERT(X5); |
| 6539 | ASSERT(!X5->value_known); |
| 6540 | } |
| 6541 | |
| 6542 | void enum9() { |
| 6543 | GET_SYMBOL_DB("const int x = 7; enum E { X0 = x, X1 };\n"); |
nothing calls this directly
no test coverage detected