mirror of
https://github.com/gbdev/rgbds.git
synced 2025-11-20 10:12:06 +00:00
Avoid nonessential strings-as-numbers in tests
This commit is contained in:
@@ -2,5 +2,4 @@ SECTION "test", ROM0
|
|||||||
db ""
|
db ""
|
||||||
dw ""
|
dw ""
|
||||||
dl ""
|
dl ""
|
||||||
assert ("") == 0
|
|
||||||
assert SIZEOF("test") == 0
|
assert SIZEOF("test") == 0
|
||||||
|
|||||||
@@ -1,5 +0,0 @@
|
|||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
|
||||||
at empty-strings.asm(5)
|
|
||||||
error: Strings as numbers must be a single charmap unit
|
|
||||||
at empty-strings.asm(5)
|
|
||||||
Assembly aborted with 1 error!
|
|
||||||
@@ -17,8 +17,8 @@ dl 0 ; separator
|
|||||||
|
|
||||||
charmap "A", $01234567
|
charmap "A", $01234567
|
||||||
charmap "B", $fedcba98
|
charmap "B", $fedcba98
|
||||||
assert "A" == $01234567
|
assert 'A' == $01234567
|
||||||
assert "B" == $fedcba98
|
assert 'B' == $fedcba98
|
||||||
db "AB" ; db $01234567, $fedcba98 (truncated to $67, $98)
|
db "AB" ; db $01234567, $fedcba98 (truncated to $67, $98)
|
||||||
dl "AB" ; dl $01234567, $fedcba98
|
dl "AB" ; dl $01234567, $fedcba98
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,5 @@
|
|||||||
warning: All character units must be 8-bit [-Wtruncation]
|
warning: All character units must be 8-bit [-Wtruncation]
|
||||||
at multivalue-charmap.asm(11)
|
at multivalue-charmap.asm(11)
|
||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
|
||||||
at multivalue-charmap.asm(20)
|
|
||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
|
||||||
at multivalue-charmap.asm(21)
|
|
||||||
warning: All character units must be 8-bit [-Wtruncation]
|
warning: All character units must be 8-bit [-Wtruncation]
|
||||||
at multivalue-charmap.asm(22)
|
at multivalue-charmap.asm(22)
|
||||||
warning: All character units must be 8-bit [-Wtruncation]
|
warning: All character units must be 8-bit [-Wtruncation]
|
||||||
|
|||||||
@@ -1,3 +1,3 @@
|
|||||||
def p = {{a}}
|
def p = {{a}}
|
||||||
def q = "{b}"
|
def q = '{b}'
|
||||||
def r = "{{c}}"
|
def r = '{{c}}'
|
||||||
|
|||||||
@@ -6,16 +6,12 @@ error: syntax error, unexpected end of line
|
|||||||
at nested-bad-interpolation.asm(1)
|
at nested-bad-interpolation.asm(1)
|
||||||
error: Interpolated symbol `b` is a reserved keyword; add a '#' prefix to use it as a raw symbol
|
error: Interpolated symbol `b` is a reserved keyword; add a '#' prefix to use it as a raw symbol
|
||||||
at nested-bad-interpolation.asm(2)
|
at nested-bad-interpolation.asm(2)
|
||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
error: Character literals must be a single charmap unit
|
||||||
at nested-bad-interpolation.asm(2)
|
|
||||||
error: Strings as numbers must be a single charmap unit
|
|
||||||
at nested-bad-interpolation.asm(2)
|
at nested-bad-interpolation.asm(2)
|
||||||
error: Interpolated symbol `c` is a reserved keyword; add a '#' prefix to use it as a raw symbol
|
error: Interpolated symbol `c` is a reserved keyword; add a '#' prefix to use it as a raw symbol
|
||||||
at nested-bad-interpolation.asm(3)
|
at nested-bad-interpolation.asm(3)
|
||||||
error: Interpolated symbol `` does not exist
|
error: Interpolated symbol `` does not exist
|
||||||
at nested-bad-interpolation.asm(3)
|
at nested-bad-interpolation.asm(3)
|
||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
error: Character literals must be a single charmap unit
|
||||||
at nested-bad-interpolation.asm(3)
|
|
||||||
error: Strings as numbers must be a single charmap unit
|
|
||||||
at nested-bad-interpolation.asm(3)
|
at nested-bad-interpolation.asm(3)
|
||||||
Assembly aborted with 8 errors!
|
Assembly aborted with 8 errors!
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ test "a" ++ """b""" ++ strupr("c") ++ strslice(#str, 0, 0), "abC"
|
|||||||
charmap "a", 1
|
charmap "a", 1
|
||||||
charmap "b", 2
|
charmap "b", 2
|
||||||
charmap "ab", 12
|
charmap "ab", 12
|
||||||
assert "a" + "b" == 3
|
assert charval("a") + charval("b") == 3
|
||||||
assert charval("a" ++ "b") == 12
|
assert charval("a" ++ "b") == 12
|
||||||
|
|
||||||
; errors
|
; errors
|
||||||
|
|||||||
@@ -1,7 +1,3 @@
|
|||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
|
||||||
at string-concat.asm(21)
|
|
||||||
warning: Treating strings as numbers is deprecated; use character literals or `CHARVAL` instead [-Wobsolete]
|
|
||||||
at string-concat.asm(21)
|
|
||||||
error: syntax error, unexpected ++
|
error: syntax error, unexpected ++
|
||||||
at string-concat.asm(25)
|
at string-concat.asm(25)
|
||||||
error: syntax error, unexpected ++, expecting ] or + or -
|
error: syntax error, unexpected ++, expecting ] or + or -
|
||||||
|
|||||||
Reference in New Issue
Block a user