Mercurial > molko
comparison tests/test-error.c @ 410:1bf7d6669f0a
tests: switch to libdt
author | David Demelier <markand@malikania.fr> |
---|---|
date | Fri, 09 Sep 2022 13:30:34 +0200 |
parents | 0ea90751a62d |
children | 8f59201dc76b |
comparison
equal
deleted
inserted
replaced
409:6011ad866e99 | 410:1bf7d6669f0a |
---|---|
16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | 16 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
17 */ | 17 */ |
18 | 18 |
19 #include <core/error.h> | 19 #include <core/error.h> |
20 | 20 |
21 #include "test.h" | 21 #include <dt.h> |
22 | 22 |
23 RX_TEST_CASE(basics, simple) | 23 static void |
24 test_basics_simple(void) | |
24 { | 25 { |
25 errorf("Failed: %d", 123); | 26 errorf("Failed: %d", 123); |
26 RX_STR_REQUIRE_EQUAL("Failed: 123", error()); | 27 DT_EQ_STR("Failed: 123", error()); |
27 } | 28 } |
28 | 29 |
29 static const struct rx_test_case tests[] = { | |
30 TEST(basics, simple) | |
31 }; | |
32 | |
33 int | 30 int |
34 main(int argc, char **argv) | 31 main(void) |
35 { | 32 { |
36 return TEST_RUN_ALL(tests, argc, argv); | 33 DT_RUN(test_basics_simple); |
34 DT_SUMMARY(); | |
37 } | 35 } |