mirror of
https://github.com/irmen/prog8.git
synced 2026-04-26 20:17:57 +00:00
fix string init error about string multiplication. fixes #209
This commit is contained in:
@@ -65,6 +65,19 @@ class TestVariables: FunSpec({
|
||||
"""
|
||||
compileText(C64Target(), false, text, outputDir, writeAssembly = true) shouldNotBe null
|
||||
}
|
||||
|
||||
test("string init with int multiplication") {
|
||||
val src="""
|
||||
main {
|
||||
sub start() {
|
||||
const uword size = 20
|
||||
const uword sizeplus = 20+1
|
||||
str @shared tmp1 = " " * size
|
||||
str @shared tmp2 = " " * sizeplus
|
||||
}
|
||||
}"""
|
||||
compileText(C64Target(), false, src, outputDir, writeAssembly = true) shouldNotBe null
|
||||
}
|
||||
|
||||
test("negation of unsigned via casts") {
|
||||
val text = """
|
||||
|
||||
Reference in New Issue
Block a user