mirror of
https://github.com/gnustep/tools-make.git
synced 2025-04-25 07:01:12 +00:00
being confusing. They now both take a simple C-string argument which names the set, and the macros check that each end matches a start of the same name. Since tis means that a START_SET no longer takes an argument sayng whether or notthe set is to be skipped, we now have a SKIP macro to be used inside a set to skip to the end of it. This is actually more versatile as we can have multiple SKIP macros in the same set, each providing a different reason for the set being skipped. Also removed a few obsolete/unused functions and macros. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/tools/make/trunk@32355 72102866-910b-0410-8b05-ffd578937521
34 lines
784 B
Objective-C
34 lines
784 B
Objective-C
#import "Testing.h"
|
|
|
|
/* A fifth test ... hope.
|
|
*
|
|
* If you run the test with 'gnustep-tests example5.m' it should
|
|
* report one hope dashed and two test passes.
|
|
*/
|
|
int
|
|
main()
|
|
{
|
|
START_SET("example set")
|
|
|
|
/* First set a flag to say that we are not expecting tests to
|
|
* actually pass.
|
|
*/
|
|
testHopeful = YES;
|
|
|
|
/* Here the test should result in a dashed hope rather than a fail.
|
|
*/
|
|
PASS(1 == 0, "silly test which we don't expect to pass")
|
|
|
|
/* This test should simply pass of course.
|
|
*/
|
|
PASS(1 == 1, "integer equality works")
|
|
|
|
END_SET("example set")
|
|
|
|
/* And here we demonstrate that on exit from the set, the global
|
|
* variable is restored to its state on entry.
|
|
*/
|
|
pass(NO == testHopeful, "the flag state is restored outside the set");
|
|
|
|
return 0;
|
|
}
|