File: example2.m

package info (click to toggle)
gnustep-make 2.9.3-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,676 kB
  • sloc: sh: 4,577; objc: 1,031; perl: 453; makefile: 56
file content (22 lines) | stat: -rw-r--r-- 491 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#import	"Testing.h"

/* A second test ... your first go at testing with ObjectiveC
 *
 * If you run the test with 'gnustep-tests example2.m' it should
 * report two test passes.
 */
int
main()
{
  /* We start a set here ...
   * Having a set means we do not need to bother creating an autorelease pool.
   */
  START_SET("example set")

  pass(1 == 1, "integer equality works");
  pass([[NSObject new] autorelease] != nil, "+new creates an object");

  END_SET("example set")

  return 0;
}