MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / testVector

Function testVector

src/common/classes/misc/class_test.cpp:38–52  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

36using namespace Firebird;
37
38void testVector()
39{
40 printf("Test Firebird::Vector: ");
41 Vector<int, 100> v;
42 int i;
43 for (i = 0; i < 100; i++)
44 v.add(i);
45 for (i = 0; i < 50; i++)
46 v.remove(0);
47 bool passed = true;
48 for (i = 50; i < 100; i++)
49 if (v[i - 50] != i)
50 passed = false;
51 printf(passed ? "PASSED\n" : "FAILED\n");
52}
53
54void testSortedVector()
55{

Callers 1

mainFunction · 0.85

Calls 2

addMethod · 0.45
removeMethod · 0.45

Tested by

no test coverage detected