We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d51231a commit 40f4d79Copy full SHA for 40f4d79
test/t-ufunction-11.cpp
@@ -40,7 +40,7 @@ TEST_CASE("Basic")
40
CHECK(func(4) == 9);
41
42
auto f2 = std::move(func);
43
- CHECK(!func);
+ CHECK_FALSE(func);
44
CHECK(f2(1) == 6);
45
}
46
@@ -63,4 +63,20 @@ TEST_CASE("from copy")
63
itlib::ufunction<int(int, int)> f2(func);
64
CHECK(f(1, 2) == 3);
65
CHECK(f2(10, 20) == 30);
66
-}
+}
67
+
68
+TEST_CASE("from null") {
69
+ {
70
+ itlib::ufunction<void()> f;
71
+ CHECK_FALSE(f);
72
+ }
73
74
+ itlib::ufunction<void()> f = nullptr;
75
76
77
78
+ void (*fp)() = nullptr;
79
+ itlib::ufunction<void()> f = fp;
80
81
82
0 commit comments