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

Function test_contains_4

dlib/test/any_function.cpp:70–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

68// ----------------------------------------------------------------------------------------
69
70 void test_contains_4(
71 const any_function<int()> a
72 )
73 {
74 DLIB_TEST(a.is_empty() == false);
75 DLIB_TEST(a.is_set() == true);
76 DLIB_TEST(a.contains<test>() == true);
77 DLIB_TEST(a.contains<int(*)()>() == false);
78 DLIB_TEST(any_cast<test>(a)() == 4);
79 DLIB_TEST(a() == 4);
80 }
81
82// ----------------------------------------------------------------------------------------
83

Callers 1

run_testFunction · 0.70

Calls 2

is_emptyMethod · 0.45
is_setMethod · 0.45

Tested by

no test coverage detected