-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tests for inlining/referencing variables of different types in DR…
…AW statement (re issue #208)
- Loading branch information
1 parent
00fcbc5
commit 523753f
Showing
12 changed files
with
101 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pcbasic] | ||
font=default | ||
quit=True | ||
run=TEST.BAS | ||
soft-linefeed=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
5 ' test DRAW with numeric variables inlined | ||
10 screen 1 | ||
20 v%=5 | ||
30 v!=5 | ||
40 v#=5 | ||
50 v$="5" | ||
60 on error goto 1000 | ||
70 open "errors.txt" for output as 1 | ||
100 ' numeric variable inline | ||
105 DRAW "F=v%;" | ||
110 DRAW "L=v!;" | ||
120 DRAW "E=v#;" | ||
130 DRAW "G=v$;" ' type mismatch | ||
999 end | ||
1000 print#1, err, erl | ||
1010 resume next | ||
|
2 changes: 2 additions & 0 deletions
2
tests/basic/gwbasic/DRAW_variable_numeric_inline/model/ERRORS.TXT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
13 130 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pcbasic] | ||
font=default | ||
quit=True | ||
run=TEST.BAS | ||
soft-linefeed=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
5 ' test DRAW with numeric variables as pointer reference | ||
10 screen 1 | ||
20 v%=5 | ||
30 v!=5 | ||
40 v#=5 | ||
50 v$="5" | ||
60 on error goto 1000 | ||
70 open "errors.txt" for output as 1 | ||
200 ' numeric variable with varptr$ | ||
205 DRAW "F=" + VARPTR$(v%) | ||
210 DRAW "L=" + VARPTR$(v!) | ||
220 DRAW "E=" + VARPTR$(v#) | ||
230 DRAW "G=" + VARPTR$(v$) ' type mismatch | ||
999 end | ||
1000 print#1, err, erl | ||
1010 resume next | ||
|
2 changes: 2 additions & 0 deletions
2
tests/basic/gwbasic/DRAW_variable_numeric_varptr/model/ERRORS.TXT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
13 230 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pcbasic] | ||
font=default | ||
quit=True | ||
run=TEST.BAS | ||
soft-linefeed=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
5 ' test DRAW with string variables inlined | ||
10 screen 1 | ||
20 v%=5 | ||
30 v!=5 | ||
40 v#=5 | ||
50 v$="D5" | ||
60 on error goto 1000 | ||
70 open "errors.txt" for output as 1 | ||
100 ' string variable inline | ||
105 DRAW "Xv%;" ' type mismatch | ||
110 DRAW "Xv!;" ' type mismatch | ||
120 DRAW "Xv#;" ' type mismatch | ||
130 DRAW "Xv$;" | ||
999 end | ||
1000 print#1, err, erl | ||
1010 resume next | ||
|
4 changes: 4 additions & 0 deletions
4
tests/basic/gwbasic/DRAW_variable_string_inline/model/ERRORS.TXT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
13 105 | ||
13 110 | ||
13 120 | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[pcbasic] | ||
font=default | ||
quit=True | ||
run=TEST.BAS | ||
soft-linefeed=True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
5 ' test DRAW with string variables as pointer reference | ||
10 screen 1 | ||
20 v%=5 | ||
30 v!=5 | ||
40 v#=5 | ||
50 v$="D5" | ||
60 on error goto 1000 | ||
70 open "errors.txt" for output as 1 | ||
200 ' string variable with varptr$ | ||
205 DRAW "X=" + VARPTR$(v%) ' type mismatch | ||
210 DRAW "X=" + VARPTR$(v!) ' type mismatch | ||
220 DRAW "X=" + VARPTR$(v#) ' type mismatch | ||
230 DRAW "X=" + VARPTR$(v$) | ||
999 end | ||
1000 print#1, err, erl | ||
1010 resume next | ||
|
5 changes: 5 additions & 0 deletions
5
tests/basic/gwbasic/DRAW_variable_string_varptr/model/ERRORS.TXT
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
5 205 | ||
5 210 | ||
5 220 | ||
5 230 | ||