aboutsummaryrefslogtreecommitdiffstats
path: root/cmd/ethtest
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-12-31 00:09:54 +0800
committerobscuren <geffobscura@gmail.com>2014-12-31 00:09:54 +0800
commit89244981a8a9f190a6afc74ec2c584692f04dcdd (patch)
treef289b00c5b18c68c9459053614599a15b836357a /cmd/ethtest
parent138ab26b8c29db00022fb6afbca153f3c1928d00 (diff)
downloaddexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.tar
dexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.tar.gz
dexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.tar.bz2
dexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.tar.lz
dexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.tar.xz
dexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.tar.zst
dexon-89244981a8a9f190a6afc74ec2c584692f04dcdd.zip
Additional checking on gas
Diffstat (limited to 'cmd/ethtest')
-rw-r--r--cmd/ethtest/main.go11
1 files changed, 8 insertions, 3 deletions
diff --git a/cmd/ethtest/main.go b/cmd/ethtest/main.go
index 94ab779db..96ef94e40 100644
--- a/cmd/ethtest/main.go
+++ b/cmd/ethtest/main.go
@@ -95,10 +95,15 @@ func RunVmTest(js string) (failed int) {
failed = 1
}
- gexp := ethutil.Big(test.Gas)
- if gexp.Cmp(gas) != 0 {
- log.Printf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas)
+ if len(test.Gas) == 0 && err == nil {
+ log.Printf("0 gas indicates error but no error given by VM")
failed = 1
+ } else {
+ gexp := ethutil.Big(test.Gas)
+ if gexp.Cmp(gas) != 0 {
+ log.Printf("%s's gas failed. Expected %v, got %v\n", name, gexp, gas)
+ failed = 1
+ }
}
for addr, account := range test.Post {