Changeset 4b54bd9 in mainline for uspace/lib/pcut/tests/teardown.c
- Timestamp:
- 2018-09-12T13:23:03Z (6 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 3da0ee4
- Parents:
- 275530a4
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
uspace/lib/pcut/tests/teardown.c
r275530a4 r4b54bd9 31 31 #include "tested.h" 32 32 33 PCUT_INIT ;33 PCUT_INIT 34 34 35 35 … … 37 37 PCUT_TEST_SUITE(with_teardown); 38 38 39 PCUT_TEST_AFTER 40 { 39 PCUT_TEST_AFTER { 41 40 printf("This is teardown-function.\n"); 42 41 } 43 42 44 PCUT_TEST(empty) 45 { 43 PCUT_TEST(empty) { 46 44 } 47 45 48 PCUT_TEST(failing) 49 { 46 PCUT_TEST(failing) { 50 47 PCUT_ASSERT_INT_EQUALS(10, intmin(1, 2)); 51 48 } … … 55 52 PCUT_TEST_SUITE(with_failing_teardown); 56 53 57 PCUT_TEST_AFTER 58 { 54 PCUT_TEST_AFTER { 59 55 printf("This is failing teardown-function.\n"); 60 56 PCUT_ASSERT_INT_EQUALS(42, intmin(10, 20)); 61 57 } 62 58 63 PCUT_TEST(empty2) 64 { 59 PCUT_TEST(empty2) { 65 60 } 66 61 67 PCUT_TEST(printing2) 68 { 62 PCUT_TEST(printing2) { 69 63 printf("Printed before test failure.\n"); 70 64 PCUT_ASSERT_INT_EQUALS(0, intmin(-17, -19)); 71 65 } 72 66 73 PCUT_TEST(failing2) 74 { 67 PCUT_TEST(failing2) { 75 68 PCUT_ASSERT_INT_EQUALS(12, intmin(3, 5)); 76 69 } 77 70 78 71 79 PCUT_MAIN() ;72 PCUT_MAIN()
Note:
See TracChangeset
for help on using the changeset viewer.