mirror of
https://github.com/irmen/prog8.git
synced 2026-04-25 12:33:55 +00:00
vm: some preparations for floating point
This commit is contained in:
@@ -44,6 +44,13 @@ class TestMemory: FunSpec({
|
||||
mem.getUB(1001) shouldBe 0xeau
|
||||
}
|
||||
|
||||
test("32 bits float access") {
|
||||
val mem = Memory()
|
||||
mem.getFloat(1000) shouldBe 0.0
|
||||
mem.setFloat(1000, -9.876543f)
|
||||
mem.getFloat(1000) shouldBe -9.876543f
|
||||
}
|
||||
|
||||
test("setstring and getstring") {
|
||||
val mem = Memory()
|
||||
mem.setString(1000, "******************", false)
|
||||
|
||||
Reference in New Issue
Block a user