fix some unittests

This commit is contained in:
Irmen de Jong 2019-08-05 21:04:15 +02:00
parent d498d5445c
commit bccfeb2fa2
2 changed files with 3 additions and 5 deletions

View File

@ -1745,7 +1745,7 @@ $endLabel""")
when(expression) {
is PrefixExpression -> translateExpression(expression)
is BinaryExpression -> translateExpression(expression)
is ArrayIndexedExpression -> translatePushFromArray(expression as ArrayIndexedExpression)
is ArrayIndexedExpression -> translatePushFromArray(expression)
is TypecastExpression -> translateExpression(expression)
is AddressOf -> translateExpression(expression)
is DirectMemoryRead -> translateExpression(expression)

View File

@ -147,12 +147,10 @@ class TestZeropage {
}
val zp2 = C64Zeropage(CompilationOptions(OutputType.RAW, LauncherType.NONE, ZeropageType.DONTUSE, emptyList(), true))
assertFailsWith<CompilerException> {
zp.allocate("", DataType.FLOAT, null)
zp2.allocate("", DataType.FLOAT, null)
}
val zp3 = C64Zeropage(CompilationOptions(OutputType.RAW, LauncherType.NONE, ZeropageType.FLOATSAFE, emptyList(), true))
assertFailsWith<CompilerException> {
zp.allocate("", DataType.FLOAT, null)
}
zp3.allocate("", DataType.FLOAT, null)
}
@Test