@@ -12,7 +12,7 @@ using Test
12
12
@fcall pbv (x)
13
13
@test x[] == 0
14
14
# const T& -> T
15
- x = @cppinit cppty " int" c
15
+ x = @cppinit cpp " int" c
16
16
xref = @ref x
17
17
@fcall pbv (xref)
18
18
@@ -21,21 +21,21 @@ using Test
21
21
px = @ptr x
22
22
GC. @preserve x @fcall pbp (px)
23
23
@test x[] == 1
24
- x = @cppinit cppty " int"
24
+ x = @cppinit cpp " int"
25
25
x[] = 1
26
26
px = @ptr x
27
27
GC. @preserve x @fcall pbp (px)
28
28
@test x[] == 2
29
- x = @cppinit cppty " int" c
29
+ x = @cppinit cpp " int" c
30
30
px = @ptr x
31
31
@test_throws ArgumentError GC. @preserve x @fcall pbp (px) # FIXME : should be ambiguous call
32
32
33
33
@info " invoke `void pbp2c(const int* ptr)`: "
34
- x = @cppinit cppty " int" c
34
+ x = @cppinit cpp " int" c
35
35
px = @ptr x
36
36
GC. @preserve x @fcall pbp2c (px)
37
37
@test x[] == 0
38
- x = @cppinit cppty " int"
38
+ x = @cppinit cpp " int"
39
39
px = @ptr x
40
40
GC. @preserve x @fcall pbp2c (px) # this is ok
41
41
@test x[] == 0
@@ -48,21 +48,21 @@ using Test
48
48
cpx = @cptr x
49
49
GC. @preserve x @fcall pbcp (cpx)
50
50
@test x[] == 2
51
- x = @cppinit cppty " int" c
51
+ x = @cppinit cpp " int" c
52
52
px = @ptr x
53
53
@test_throws ArgumentError GC. @preserve x @fcall pbcp (px) # no permissive
54
- x = @cppinit cppty " int"
54
+ x = @cppinit cpp " int"
55
55
x[] = 2
56
56
px = @ptr x
57
57
GC. @preserve x @fcall pbcp (px)
58
58
@test x[] == 3
59
59
60
60
@info " invoke `void pbcp2c(const int* const ptr)`: "
61
- x = @cppinit cppty " int" c
61
+ x = @cppinit cpp " int" c
62
62
px = @ptr x
63
63
GC. @preserve x @fcall pbcp2c (px)
64
64
@test x[] == 0
65
- x = @cppinit cppty " int"
65
+ x = @cppinit cpp " int"
66
66
px = @ptr x
67
67
GC. @preserve x @fcall pbcp2c (px)
68
68
@test x[] == 0
@@ -78,21 +78,21 @@ using Test
78
78
xref = @ref x
79
79
@fcall pblvr (xref)
80
80
@test x[] == 2
81
- x = @cppinit cppty " int" c
81
+ x = @cppinit cpp " int" c
82
82
@test_throws ArgumentError @fcall pblvr (x) # should not discard const-qualifier
83
83
xref = @ref x
84
84
@test_throws ArgumentError @fcall pblvr (xref) # should not discard const-qualifier
85
85
86
86
@info " invoke `void pbclvr(const int& ref)`: "
87
- x = @cppinit cppty " int" c
87
+ x = @cppinit cpp " int" c
88
88
x[] = 1 # FIXME : this should not be allowed
89
89
@fcall pbclvr (x)
90
90
@test x[] == 1
91
91
xref = @ref x
92
92
xref[] = 2 # FIXME : this should not be allowed
93
93
@fcall pbclvr (xref)
94
94
@test x[] == 2
95
- x = @cppinit cppty " int"
95
+ x = @cppinit cpp " int"
96
96
x[] = 1
97
97
@fcall pbclvr (x)
98
98
@test x[] == 1
@@ -132,29 +132,29 @@ end
132
132
@test_logs min_level= Logging. Error declare """ #include "overloading.h" """
133
133
134
134
@info " `void increment(const int& value)` vs `void increment(int value)`:"
135
- x = @cppinit cppty " int" c
135
+ x = @cppinit cpp " int" c
136
136
@fcall increment (x:: Cint ) # calls `void increment(int value)`
137
137
@test x[] == 0
138
- @fcall increment (x:: CppRef{cppty "int"c} ) # calls `void increment(const int& value)`
138
+ @fcall increment (x:: CppRef{cpp "int"c} ) # calls `void increment(const int& value)`
139
139
@test x[] == 0
140
140
@test_throws ArgumentError @fcall increment (x) # ambiguous call
141
141
142
142
xref = @ref x
143
- @fcall increment (xref:: CppRef{cppty "int"c} ) # calls `void increment(const int& value)`
143
+ @fcall increment (xref:: CppRef{cpp "int"c} ) # calls `void increment(const int& value)`
144
144
@test x[] == 0
145
145
@fcall increment (xref:: Cint ) # calls `void increment(int value)`
146
146
@test x[] == 0
147
147
@test_throws ArgumentError @fcall increment (xref) # ambiguous call
148
148
149
- x = @cppinit cppty " int"
150
- @fcall increment (x:: CppRef{cppty "int"c} ) # calls `void increment(const int& value)`
149
+ x = @cppinit cpp " int"
150
+ @fcall increment (x:: CppRef{cpp "int"c} ) # calls `void increment(const int& value)`
151
151
@test x[] == 0
152
152
@fcall increment (x:: Cint ) # calls `void increment(int value)`
153
153
@test x[] == 0
154
154
@test_throws ArgumentError @fcall increment (x) # ambiguous call
155
155
156
156
xref = @ref x
157
- @fcall increment (xref:: CppRef{cppty "int"c} ) # calls `void increment(const int& value)`
157
+ @fcall increment (xref:: CppRef{cpp "int"c} ) # calls `void increment(const int& value)`
158
158
@test x[] == 0
159
159
@fcall increment (xref:: Cint ) # calls `void increment(int value)`
160
160
@test x[] == 0
0 commit comments