git ssb

0+

wanderer🌟 / js-primea-hypervisor



Commit eaedfe161bce8061931a7893d8f339ac2b36f711

Tests: use 100 ETH for balance/getCallValue tests

Alex Beregszaszi committed on 8/24/2016, 1:43:03 AM
Parent: 7bdb45f839d00fd23e2821b96c8b2fbb316c7dcb

Files changed

tests/interface/balance.jsonchanged
tests/interface/balance.wastchanged
tests/interface/callValue.jsonchanged
tests/interface/callValue.wastchanged
tests/interface/balance.jsonView
@@ -1,9 +1,9 @@
11 {
22 "accounts": [
33 [
44 "0x5d48c1018904a172886829bbbd9c6f4a2d06c47b", {
5- "balance": "100"
5+ "balance": "0x056bc75e2d63100000"
66 }
77 ]
88 ]
99 }
tests/interface/balance.wastView
@@ -1,15 +1,15 @@
1-;; address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b has a balance of 100
1+;; address of 5d48c1018904a172886829bbbd9c6f4a2d06c47b has a balance of 0x056bc75e2d63100000 (100 ETH)
22 (module
33 (memory 1 (segment 0 "\5d\48\c1\01\89\04\a1\72\88\68\29\bb\bd\9c\6f\4a\2d\06\c4\7b"))
44 (import $balance "ethereum" "getBalance" (param i32 i32))
55 (export "a" memory)
66 (export "test" 0)
77 (func
88 (block
99 (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))
1212 (return)
1313 )
1414 )
1515 (unreachable)
tests/interface/callValue.jsonView
@@ -1,3 +1,3 @@
11 {
2- "callValue": "100"
2+ "callValue": "0x056bc75e2d63100000"
33 }
tests/interface/callValue.wastView
@@ -1,5 +1,5 @@
1-;; call value of 100
1+;; call value of 0x056bc75e2d63100000 (100 ETH)
22 (module
33 (memory 1)
44 (import $callValue "ethereum" "getCallValue" (param i32))
55
@@ -7,10 +7,10 @@
77 (export "test" 0)
88 (func
99 (block
1010 (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))
1313 (return)
1414 )
1515 )
1616 (unreachable)

Built with git-ssb-web