File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ setup_wheel_test (utils_not_null_test utils_not_null_test.cxx )
Original file line number Diff line number Diff line change 1+ #include < __internal/__assert.hxx>
2+ #include < wheel_utils/logging.hxx>
3+
4+ #if defined (WHEEL_EXPERIMENT)
5+ using wheel_utils::is_pointer_value;
6+ using wheel_utils::not_null;
7+ #endif
8+
9+ #if defined (WHEEL_EXPERIMENT)
10+
11+ TEST (test_is_pointer_value)
12+ assert_eq(is_pointer_value<int >, false );
13+ assert_eq (is_pointer_value<int *>, true );
14+ assert_eq (is_pointer_value<void *>, true );
15+ DONE
16+
17+ #if defined (WHEEL_NO_FAIL_FAST)
18+ TEST (test_no_fail_fast)
19+ assert_eq(not_null<void *>(nullptr ), false);
20+
21+ int var = 10 ;
22+ int *var_p = &var;
23+ assert_eq (not_null<int *>(var_p), true);
24+ DONE
25+
26+ #else
27+ NO_TEST (test_no_fail_fast)
28+ #endif
29+
30+ #else
31+ NO_TEST (test_is_pointer_value)
32+ NO_TEST(test_no_fail_fast)
33+ #endif
34+
35+ TEST_MAIN
36+ RUN (test_is_pointer_value)
37+ RUN(test_no_fail_fast)
38+ END_MAIN
You can’t perform that action at this time.
0 commit comments