Skip to content

Commit ca3a246

Browse files
committed
cast const ptr: tidy up tests for sf.net bug 801
1 parent 2960949 commit ca3a246

File tree

10 files changed

+33
-28
lines changed

10 files changed

+33
-28
lines changed

tests/const/rtl-clear.bas

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,5 @@ scope
77
dim as const integer a = 256
88

99
clear a, 0, sizeof(integer)
10+
11+
end scope
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
' TEST_MODE : COMPILE_ONLY_FAIL
2+
3+
'' from sf.net #801
4+
5+
scope
6+
type UDT
7+
i as integer
8+
end type
9+
10+
dim x as UDT
11+
12+
'' Expected to fail
13+
type<UDT>(1) = x
14+
15+
end scope

tests/structs/anon-invalid-initializer.bas renamed to tests/structs/anon-invalid-initializer-2.bas

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,7 @@ scope
99

1010
dim x as UDT
1111

12-
'' OK
13-
type<UDT>(0).i = 1
14-
*@type<UDT>(0).i = 1
15-
1612
'' Expected to fail
17-
type<UDT>(1) = x
1813
*@type<UDT>(1) = x
1914

2015
end scope
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
' TEST_MODE : COMPILE_ONLY_OK
2+
3+
'' from sf.net #801
4+
5+
scope
6+
type UDT
7+
i as integer
8+
end type
9+
10+
dim x as UDT
11+
12+
'' OK
13+
type<UDT>(0).i = 1
14+
*@type<UDT>(0).i = 1
15+
16+
end scope

tests/warnings/const-discard.bas

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -132,24 +132,6 @@ scope
132132
end scope
133133
end scope
134134

135-
'' --------------------------------------------------------
136-
137-
'' from sf.net #801
138-
139-
WARN( 0 )
140-
141-
scope
142-
type UDT
143-
i as integer
144-
end type
145-
146-
dim x as UDT
147-
148-
type<UDT>(0).i = 1
149-
*@type<UDT>(0).i = 1
150-
151-
end scope
152-
153135
'' ----------------
154136

155137
#print "---- RTLIB"

tests/warnings/r/dos/const-discard.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONST UBYTE PTR
1616
CONST UBYTE PTR
1717
CONST UBYTE PTR
1818
CONST UBYTE PTR
19-
none expected
2019
---- RTLIB
2120
warning expected
2221
CONST qualifier discarded

tests/warnings/r/linux-x86/const-discard.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONST UBYTE PTR
1616
CONST UBYTE PTR
1717
CONST UBYTE PTR
1818
CONST UBYTE PTR
19-
none expected
2019
---- RTLIB
2120
warning expected
2221
CONST qualifier discarded

tests/warnings/r/linux-x86_64/const-discard.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONST UBYTE PTR
1616
CONST UBYTE PTR
1717
CONST UBYTE PTR
1818
CONST UBYTE PTR
19-
none expected
2019
---- RTLIB
2120
warning expected
2221
CONST qualifier discarded

tests/warnings/r/win32/const-discard.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONST UBYTE PTR
1616
CONST UBYTE PTR
1717
CONST UBYTE PTR
1818
CONST UBYTE PTR
19-
none expected
2019
---- RTLIB
2120
warning expected
2221
CONST qualifier discarded

tests/warnings/r/win64/const-discard.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ CONST UBYTE PTR
1616
CONST UBYTE PTR
1717
CONST UBYTE PTR
1818
CONST UBYTE PTR
19-
none expected
2019
---- RTLIB
2120
warning expected
2221
CONST qualifier discarded

0 commit comments

Comments
 (0)