MCPcopy Create free account
hub / github.com/Tripwire/tripwire-open-source / addRemove

Function addRemove

src/twtest/fcopropvector_t.cpp:114–137  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112
113
114static void addRemove(cFCOPropVector& test1, cFCOPropVector& test2, cDebug& d)
115{
116 int var1 = 0, var2 = 64, var3 = 2;
117
118 test1.AddItem(var1);
119 TEST(test1.ContainsItem(var1)); //hopefully this is true!
120 TEST(!test1.ContainsItem(var3));
121
122 test2.SetSize(var2);
123 TEST((test2.GetSize() == ((var2 / 32) + 1) * 32));
124 TEST((test1 != test2));
125
126 test1.RemoveItem(var1);
127 test2.SetSize(test1.GetSize());
128 TEST(test1 == test2);
129
130 test1.AddItem(var3);
131 test2 |= test1;
132 d.TraceDetail("\nmMask should be 4!\n");
133 test2.check(d);
134 test2.RemoveItem(var3);
135 d.TraceDetail("\nmMask should be 0! \n");
136 test2.check(d);
137}
138
139static void objManip(cFCOPropVector& testV, cDebug& d)
140{

Callers 1

TestFCOPropVectorFunction · 0.85

Calls 7

ContainsItemMethod · 0.80
SetSizeMethod · 0.80
checkMethod · 0.80
TraceDetailMethod · 0.60
AddItemMethod · 0.45
GetSizeMethod · 0.45
RemoveItemMethod · 0.45

Tested by 1

TestFCOPropVectorFunction · 0.68