| 10 | namespace ValdiTest { |
| 11 | |
| 12 | TEST(Marshaller, canPushAndPopValues) { |
| 13 | SimpleExceptionTracker exceptionTracker; |
| 14 | Marshaller marshaller(exceptionTracker); |
| 15 | |
| 16 | ASSERT_EQ(0, marshaller.size()); |
| 17 | |
| 18 | marshaller.push(Value(1)); |
| 19 | marshaller.push(Value(2)); |
| 20 | marshaller.push(Value(3)); |
| 21 | |
| 22 | ASSERT_EQ(3, marshaller.size()); |
| 23 | |
| 24 | marshaller.pop(); |
| 25 | |
| 26 | ASSERT_TRUE(exceptionTracker); |
| 27 | |
| 28 | ASSERT_EQ(2, marshaller.size()); |
| 29 | |
| 30 | marshaller.pop(); |
| 31 | ASSERT_TRUE(exceptionTracker); |
| 32 | marshaller.pop(); |
| 33 | ASSERT_TRUE(exceptionTracker); |
| 34 | |
| 35 | ASSERT_EQ(0, marshaller.size()); |
| 36 | } |
| 37 | |
| 38 | TEST(Marshaller, canSafelyGetUndefined) { |
| 39 | SimpleExceptionTracker exceptionTracker; |
nothing calls this directly
no test coverage detected