Skip to content

Commit 9a26ed4

Browse files
committed
tests: Update cfg test output for cython
1 parent acb4a57 commit 9a26ed4

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed

tests/expectations/cfg.pyx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ cdef extern from *:
1414

1515
cdef extern from *:
1616

17+
IF PLATFORM_UNIX:
18+
const uint32_t FOO_CONST # = 0
19+
20+
IF PLATFORM_WIN:
21+
const uint32_t FOO_CONST # = 1
22+
23+
IF not (PLATFORM_UNIX or PLATFORM_WIN):
24+
const uint32_t FOO_CONST # = 61453
25+
26+
IF PLATFORM_UNIX:
27+
const uint8_t BAR_CONST # = 0
28+
29+
IF PLATFORM_WIN:
30+
const uint8_t BAR_CONST # = raise TypeError("reached unreachable code")
31+
32+
IF not (PLATFORM_UNIX or PLATFORM_WIN):
33+
const uint8_t BAR_CONST # = 1
34+
35+
IF (X11 and PLATFORM_UNIX):
36+
const uint8_t BAZ_CONST # = 0
37+
38+
IF (X11 and PLATFORM_WIN):
39+
const uint8_t BAZ_CONST # = 1
40+
41+
IF (X11 and not (PLATFORM_UNIX or PLATFORM_WIN)):
42+
const uint8_t BAZ_CONST # = raise TypeError("Baz error")
43+
1744
IF (PLATFORM_WIN or M_32):
1845
cdef enum:
1946
A,

tests/expectations/cfg_tag.pyx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,33 @@ cdef extern from *:
1414

1515
cdef extern from *:
1616

17+
IF PLATFORM_UNIX:
18+
const uint32_t FOO_CONST # = 0
19+
20+
IF PLATFORM_WIN:
21+
const uint32_t FOO_CONST # = 1
22+
23+
IF not (PLATFORM_UNIX or PLATFORM_WIN):
24+
const uint32_t FOO_CONST # = 61453
25+
26+
IF PLATFORM_UNIX:
27+
const uint8_t BAR_CONST # = 0
28+
29+
IF PLATFORM_WIN:
30+
const uint8_t BAR_CONST # = raise TypeError("reached unreachable code")
31+
32+
IF not (PLATFORM_UNIX or PLATFORM_WIN):
33+
const uint8_t BAR_CONST # = 1
34+
35+
IF (X11 and PLATFORM_UNIX):
36+
const uint8_t BAZ_CONST # = 0
37+
38+
IF (X11 and PLATFORM_WIN):
39+
const uint8_t BAZ_CONST # = 1
40+
41+
IF (X11 and not (PLATFORM_UNIX or PLATFORM_WIN)):
42+
const uint8_t BAZ_CONST # = raise TypeError("Baz error")
43+
1744
IF (PLATFORM_WIN or M_32):
1845
cdef enum:
1946
A,

0 commit comments

Comments
 (0)