File: example2.m

package info (click to toggle)
gnustep-make 2.6.2-2
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 3,084 kB
  • sloc: sh: 3,990; objc: 806; makefile: 229; perl: 71
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;
}