mirror of
https://github.com/irmen/prog8.git
synced 2024-09-07 19:54:26 +00:00
fix char range in float-range test and exclude test.p8 example from tests
This commit is contained in:
parent
5145296486
commit
7241cef7a5
@ -75,7 +75,6 @@ class TestCompilerOnExamples {
|
||||
"swirl",
|
||||
"swirl-float",
|
||||
"tehtriz",
|
||||
"test",
|
||||
"textelite",
|
||||
),
|
||||
dim2 = listOf(Cx16Target, C64Target),
|
||||
|
@ -56,14 +56,13 @@ class TestCompilerOnRanges {
|
||||
}
|
||||
|
||||
@Test
|
||||
@Disabled("#55: bug in ConstantIdentifierReplacer.before(VarDecl)@decl.datatype==ARRAY_F")
|
||||
fun testFloatArrayInitializerWithRange_char_to_char() {
|
||||
val platform = C64Target
|
||||
val result = compileText(platform, optimize = false, """
|
||||
%option enable_floats
|
||||
main {
|
||||
sub start() {
|
||||
float[] cs = @'a' to 'z' ; values are computed at compile time
|
||||
float[] cs = 'a' to 'z' ; values are computed at compile time
|
||||
cs[0] = 23 ; keep optimizer from removing it
|
||||
}
|
||||
}
|
||||
@ -76,7 +75,7 @@ class TestCompilerOnRanges {
|
||||
val rhsValues = (decl.value as ArrayLiteralValue)
|
||||
.value // Array<Expression>
|
||||
.map { (it as NumericLiteralValue).number.toInt() }
|
||||
val expectedStart = platform.encodeString("a", true)[0].toInt()
|
||||
val expectedStart = platform.encodeString("a", false)[0].toInt()
|
||||
val expectedEnd = platform.encodeString("z", false)[0].toInt()
|
||||
val expectedStr = "$expectedStart .. $expectedEnd"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user