MCPcopy Create free account
hub / github.com/Snapchat/Valdi / TEST

Function TEST

valdi/test/runtime/Marshaller_tests.cpp:12–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10namespace ValdiTest {
11
12TEST(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
38TEST(Marshaller, canSafelyGetUndefined) {
39 SimpleExceptionTracker exceptionTracker;

Callers

nothing calls this directly

Calls 15

getOrUndefinedMethod · 0.80
clearErrorMethod · 0.80
pushArrayMethod · 0.80
setArrayItemMethod · 0.80
getArrayLengthMethod · 0.80
copyMapMethod · 0.80
mergeMapsMethod · 0.80
popMethod · 0.65
getMethod · 0.65
getMapMethod · 0.65
getStringMethod · 0.65

Tested by

no test coverage detected