MCPcopy Create free account
hub / github.com/davisking/dlib / array2d_kernel_test

Function array2d_kernel_test

dlib/test/array2d.cpp:26–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 typename array2d
25 >
26 void array2d_kernel_test (
27 )
28 /*!
29 requires
30 - array2d is an implementation of array2d/array2d_kernel_abstract.h
31 is instantiated with unsigned long
32 ensures
33 - runs tests on array2d for compliance with the specs
34 !*/
35 {
36 srand(static_cast<unsigned int>(time(0)));
37
38 array2d test,test2;
39
40 long nc, nr;
41
42
43 DLIB_TEST(get_rect(test).is_empty());
44
45 enumerable<unsigned long>& e = test;
46 DLIB_TEST(e.at_start() == true);
47
48
49 DLIB_TEST(e.size() == 0);
50 DLIB_TEST(e.at_start() == true);
51 DLIB_TEST(e.current_element_valid() == false);
52
53 DLIB_TEST (e.move_next() == false);
54 DLIB_TEST (e.move_next() == false);
55 DLIB_TEST (e.move_next() == false);
56 DLIB_TEST (e.move_next() == false);
57 DLIB_TEST (e.move_next() == false);
58 DLIB_TEST (e.move_next() == false);
59
60
61 DLIB_TEST(e.size() == 0);
62 DLIB_TEST(e.at_start() == false);
63 DLIB_TEST(e.current_element_valid() == false);
64
65
66 e.reset();
67
68 DLIB_TEST(e.size() == 0);
69 DLIB_TEST(e.at_start() == true);
70 DLIB_TEST(e.current_element_valid() == false);
71
72
73 DLIB_TEST(get_rect(test).is_empty());
74
75
76
77 DLIB_TEST(test.at_start() == true);
78
79
80 DLIB_TEST(test.size() == 0);
81 DLIB_TEST(test.at_start() == true);
82 DLIB_TEST(test.current_element_valid() == false);
83

Callers

nothing calls this directly

Calls 15

get_rectFunction · 0.85
swapFunction · 0.70
serializeFunction · 0.70
deserializeFunction · 0.70
randClass · 0.50
is_emptyMethod · 0.45
at_startMethod · 0.45
sizeMethod · 0.45
current_element_validMethod · 0.45
move_nextMethod · 0.45
resetMethod · 0.45
clearMethod · 0.45

Tested by

no test coverage detected