Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix test case for SimpleAdderVM.runSteps() after PR 17
Output was:

3) Contract: SimpleAdderVM should run steps:

      AssertionError: expected [ Array(2) ] to deeply equal [ Array(2) ]
      + expected - actual

       [
         [
      -    "0x4000000000000000000000000000000000000000000000000000000000000000"
      -    "0xa000000000000000000000000000000000000000000000000000000000000000"
      +    "0x0000000000000000000000000000000000000000000000000000000000000004"
      +    "0x0000000000000000000000000000000000000000000000000000000000000004"
      +    "0x0000000000000000000000000000000000000000000000000000000000000006"
           "0x0000000000000000000000000000000000000000000000000000000000000005"
         ]
      -  "0xe72f7cc82a531b841eeb3b3a0ae1be6dad22bdec19b87a38f535df65c0ed4b06"
      +  "0x00b6b0f456d4b05f44bd2f7ad745e2350d8dfd0bd68cdda97c011e988ca58998"
       ]
  • Loading branch information
juztamau5 committed Apr 5, 2018
commit 84297a7eb701faeafc4deae4a64eb1f898f61853
18 changes: 14 additions & 4 deletions test/simple_adder_vm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,18 @@ const toResult = (data) => {
contract('SimpleAdderVM', function(accounts) {
let simpleAdderVM

let program = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"]
let program = [
"0x0000000000000000000000000000000000000000000000000000000000000000",
"0x0000000000000000000000000000000000000000000000000000000000000001",
"0x0000000000000000000000000000000000000000000000000000000000000002",
"0x0000000000000000000000000000000000000000000000000000000000000003",
"0x0000000000000000000000000000000000000000000000000000000000000004",
"0x0000000000000000000000000000000000000000000000000000000000000005",
"0x0000000000000000000000000000000000000000000000000000000000000006",
"0x0000000000000000000000000000000000000000000000000000000000000007",
"0x0000000000000000000000000000000000000000000000000000000000000008",
"0x0000000000000000000000000000000000000000000000000000000000000009"
]

before(async () => {
simpleAdderVM = await SimpleAdderVM.deployed()
Expand Down Expand Up @@ -48,11 +59,10 @@ contract('SimpleAdderVM', function(accounts) {
await simpleAdderVM.runSteps.call(program, 5),
[
[ '0x0000000000000000000000000000000000000000000000000000000000000004',
'0x0000000000000000000000000000000000000000000000000000000000000004',
'0x0000000000000000000000000000000000000000000000000000000000000006',
'0x000000000000000000000000000000000000000000000000000000000000000a',
'0x0000000000000000000000000000000000000000000000000000000000000005'
],
'0x00b6b0f456d4b05f44bd2f7ad745e2350d8dfd0bd68cdda97c011e988ca58998'
'0x7399a9b676993b56ca6d584f739e60fe0bc6e7b527b3196ed9ee8086cfa08599'
]
)
})
Expand Down