summaryrefslogtreecommitdiffstats
path: root/Tests/SwiftMix/SwiftMain.swift
blob: 238059d72505aff4829d5f8df06624e8183afc4b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import Foundation

@objc class SwiftMainClass : NSObject {
  @objc class func SwiftMain() -> Int32 {
    dump("Hello World!");
#if FOO
    dump("FOO defined");
#else
    fatalError("FOO not defined");
#endif
#if BAR
    dump("BAR defined");
#else
    fatalError("BAR not defined");
#endif
#if CCOND
    fatalError("CCOND defined");
#else
    dump("CCOND not defined");
#endif
#if SWIFTCOND
    dump("SWIFTCOND defined");
#else
    fatalError("SWIFTCOND not defined");
#endif
    return 0;
  }
}