Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
nebula
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
exchain
nebula
Commits
12fa6d88
Commit
12fa6d88
authored
Oct 27, 2021
by
George Hotz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
failure in js
parent
049555b2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
+13
-0
mips_test_memory.js
test/mips_test_memory.js
+13
-0
No files found.
test/mips_test_memory.js
View file @
12fa6d88
...
...
@@ -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
)
})
})
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment