static void testUseSteps(void) { int nr = 0; char buffer[100]; CU_pTeststep step; const char* test = CU_get_current_test()->pName; CU_FAIL ("Failure before the first test step"); for (nr=0; nr < 15; nr++) { step = initStep (" ==> %s (nr=%2d) ...", test, nr); CU_ASSERT_NOT_EQUAL(nr, 11); CU_ASSERT_NOT_EQUAL(0, nr); CU_ASSERT_NOT_EQUAL(-12, nr); CU_ASSERT_NOT_EQUAL(10, nr); exitStep(step); } continueTest(); CU_FAIL ("Failure after the first test step set");
for (nr=0; nr < 15; nr++) { step = initStep (" ==> %s (2nd set: nr=%2d) ...", test, nr); CU_ASSERT_NOT_EQUAL(nr, 8); CU_ASSERT_NOT_EQUAL(3, nr); CU_ASSERT_NOT_EQUAL(-4, nr); CU_ASSERT_NOT_EQUAL(-nr, nr); exitStep(step); } continueTest(); CU_FAIL ("Failure after the last test step"); }
|
Suite: TestUseSteps Test: testUseSteps ... ==> testUseSteps (nr= 0) ...FAILED 1. ExampleTests.c:304 - CU_ASSERT_NOT_EQUAL(0,nr) ==> testUseSteps (nr= 1) ...passed ==> testUseSteps (nr= 2) ...passed ==> testUseSteps (nr= 3) ...passed ==> testUseSteps (nr= 4) ...passed ==> testUseSteps (nr= 5) ...passed ==> testUseSteps (nr= 6) ...passed ==> testUseSteps (nr= 7) ...passed ==> testUseSteps (nr= 8) ...passed ==> testUseSteps (nr= 9) ...passed ==> testUseSteps (nr=10) ...FAILED 1. ExampleTests.c:306 - CU_ASSERT_NOT_EQUAL(10,nr) ==> testUseSteps (nr=11) ...FAILED 1. ExampleTests.c:303 - CU_ASSERT_NOT_EQUAL(nr,11) ==> testUseSteps (nr=12) ...passed ==> testUseSteps (nr=13) ...passed ==> testUseSteps (nr=14) ...passed testUseSteps continued ... ==> testUseSteps (2nd set: nr= 0) ...FAILED 1. ExampleTests.c:317 - CU_ASSERT_NOT_EQUAL(-nr,nr) ==> testUseSteps (2nd set: nr= 1) ...passed ==> testUseSteps (2nd set: nr= 2) ...passed ==> testUseSteps (2nd set: nr= 3) ...FAILED 1. ExampleTests.c:315 - CU_ASSERT_NOT_EQUAL(3,nr) ==> testUseSteps (2nd set: nr= 4) ...passed ==> testUseSteps (2nd set: nr= 5) ...passed ==> testUseSteps (2nd set: nr= 6) ...passed ==> testUseSteps (2nd set: nr= 7) ...passed ==> testUseSteps (2nd set: nr= 8) ...FAILED 1. ExampleTests.c:314 - CU_ASSERT_NOT_EQUAL(nr,8) ==> testUseSteps (2nd set: nr= 9) ...passed ==> testUseSteps (2nd set: nr=10) ...passed ==> testUseSteps (2nd set: nr=11) ...passed ==> testUseSteps (2nd set: nr=12) ...passed ==> testUseSteps (2nd set: nr=13) ...passed ==> testUseSteps (2nd set: nr=14) ...passed testUseSteps continued ...FAILED 1. ExampleTests.c:299 - CU_FAIL("Failure before the first test step") 2. ExampleTests.c:304 - CU_ASSERT_NOT_EQUAL(0,nr) 3. ExampleTests.c:306 - CU_ASSERT_NOT_EQUAL(10,nr) 4. ExampleTests.c:303 - CU_ASSERT_NOT_EQUAL(nr,11) 5. ExampleTests.c:310 - CU_FAIL("Failure after the first test step set") 6. ExampleTests.c:317 - CU_ASSERT_NOT_EQUAL(-nr,nr) 7. ExampleTests.c:315 - CU_ASSERT_NOT_EQUAL(3,nr) 8. ExampleTests.c:314 - CU_ASSERT_NOT_EQUAL(nr,8) 9. ExampleTests.c:321 - CU_FAIL("Failure after the last test step")
|