Commit eaedfe161bce8061931a7893d8f339ac2b36f711
Tests: use 100 ETH for balance/getCallValue tests
Alex Beregszaszi committed on 8/24/2016, 1:43:03 AMParent: 7bdb45f839d00fd23e2821b96c8b2fbb316c7dcb
Files changed
tests/interface/balance.json | changed |
tests/interface/balance.wast | changed |
tests/interface/callValue.json | changed |
tests/interface/callValue.wast | changed |
tests/interface/balance.json | ||
---|---|---|
@@ -1,9 +1,9 @@ | ||
1 | 1 | { |
2 | 2 | "accounts": [ |
3 | 3 | [ |
4 | 4 | "0x5d48c1018904a172886829bbbd9c6f4a2d06c47b", { |
5 | - "balance": "100" | |
5 | + "balance": "0x056bc75e2d63100000" | |
6 | 6 | } |
7 | 7 | ] |
8 | 8 | ] |
9 | 9 | } |
tests/interface/balance.wast | ||
---|---|---|
@@ -1,15 +1,15 @@ | ||
1 | -;; address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b has a balance of 100 | |
1 | +;; address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b has a balance of 0x056bc75e2d63100000 (100 ETH) | |
2 | 2 | (module |
3 | 3 | (memory 1 (segment 0 "\5d\48\c1\01\89\04\a1\72\88\68\29\bb\bd\9c\6f\4a\2d\06\c4\7b")) |
4 | 4 | (import $balance "ethereum" "getBalance" (param i32 i32)) |
5 | 5 | (export "a" memory) |
6 | 6 | (export "test" 0) |
7 | 7 | (func |
8 | 8 | (block |
9 | 9 | (call_import $balance (i32.const 0) (i32.const 0)) |
10 | - (if (i64.eq (i64.load (i32.const 0)) (i64.const 100)) | |
11 | - (if (i64.eq (i64.load (i32.const 8)) (i64.const 0)) | |
10 | + (if (i64.eq (i64.load (i32.const 0)) (i64.const 0x6bc75e2d63100000)) | |
11 | + (if (i64.eq (i64.load (i32.const 8)) (i64.const 0x05)) | |
12 | 12 | (return) |
13 | 13 | ) |
14 | 14 | ) |
15 | 15 | (unreachable) |
tests/interface/callValue.json | ||
---|---|---|
@@ -1,3 +1,3 @@ | ||
1 | 1 | { |
2 | - "callValue": "100" | |
2 | + "callValue": "0x056bc75e2d63100000" | |
3 | 3 | } |
tests/interface/callValue.wast | ||
---|---|---|
@@ -1,5 +1,5 @@ | ||
1 | -;; call value of 100 | |
1 | +;; call value of 0x056bc75e2d63100000 (100 ETH) | |
2 | 2 | (module |
3 | 3 | (memory 1) |
4 | 4 | (import $callValue "ethereum" "getCallValue" (param i32)) |
5 | 5 | |
@@ -7,10 +7,10 @@ | ||
7 | 7 | (export "test" 0) |
8 | 8 | (func |
9 | 9 | (block |
10 | 10 | (call_import $callValue (i32.const 0)) |
11 | - (if (i64.eq (i64.load (i32.const 0)) (i64.const 100)) | |
12 | - (if (i64.eq (i64.load (i32.const 8)) (i64.const 0)) | |
11 | + (if (i64.eq (i64.load (i32.const 0)) (i64.const 0x6bc75e2d63100000)) | |
12 | + (if (i64.eq (i64.load (i32.const 8)) (i64.const 0x05)) | |
13 | 13 | (return) |
14 | 14 | ) |
15 | 15 | ) |
16 | 16 | (unreachable) |
Built with git-ssb-web