Commit 12fa6d88 authored by George Hotz's avatar George Hotz

failure in js

parent 049555b2
......@@ -39,4 +39,17 @@ describe("MIPSMemory contract", function () {
expect(await mm.ReadMemory(root, 4)).to.equal(2)
expect(await mm.ReadMemory(root, 0x40)).to.equal(3)
})
it("write four should work", async function() {
await mm.AddTrieNode(new Uint8Array([0x80]))
let root = "0x56e81f171bcc55a6ff8345e692c0f86e5b48e01b996cadc001622fb5e363b421"
root = await write(mm, root, 0xc0000080, 0xaa)
root = await write(mm, root, 0x7fffd00c, 1)
root = await write(mm, root, 0x7fffd010, 2)
root = await write(mm, root, 0x7fffcffc, 3)
expect(await mm.ReadMemory(root, 0x7fffd00c)).to.equal(1)
expect(await mm.ReadMemory(root, 0x7fffd010)).to.equal(2)
expect(await mm.ReadMemory(root, 0x7fffcffc)).to.equal(3)
})
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment