Skip to content

Commit 0104a5b

Browse files
committed
Check macro conditionals
1 parent 1ce2e45 commit 0104a5b

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

tests/samples/Define.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,13 @@
88

99
extern int a;
1010
#define MY_A a // unsupported
11+
12+
#ifdef NOT_DEFINED
13+
#define SHOULD_NOT_BE_DEFINED 0
14+
#endif
15+
16+
#if INT == 0
17+
#define SHOULD_NOT_BE_DEFINED 1
18+
#else
19+
#define SHOULD_BE_DEFINED 2
20+
#endif

tests/samples/Define.scala

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ object DefineDefines {
77
val STRING: native.CString = c"Hello, World!"
88
val INT = 42
99
val FLOAT = 5.6
10+
val SHOULD_BE_DEFINED = 2
1011
}

0 commit comments

Comments
 (0)