This commit is contained in:
Karol Stasiak 2022-02-11 21:48:24 +01:00
parent a70a1c0e6b
commit ef2f5b5918
1 changed files with 18 additions and 0 deletions

View File

@ -167,4 +167,22 @@ class ReturnDispatchSuite extends FunSuite with Matchers {
| void success() {}
""".stripMargin)
}
test("Optimization test") {
EmuCrossPlatformBenchmarkRun(Cpu.Mos, Cpu.Z80, Cpu.Motorola6809)(
"""
| byte output @$c000
| void main () {
| if true {
| return [1] {
| 1 @ success
| }
| }
| }
| void success() {
| output = 42
| }
""".stripMargin) { m =>
m.readByte(0xc000) should equal(42)
}
}
}