mirror of
https://github.com/KarolS/millfork.git
synced 2024-05-31 18:41:30 +00:00
Add test
This commit is contained in:
parent
a70a1c0e6b
commit
ef2f5b5918
|
@ -167,4 +167,22 @@ class ReturnDispatchSuite extends FunSuite with Matchers {
|
||||||
| void success() {}
|
| void success() {}
|
||||||
""".stripMargin)
|
""".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)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user