aboutsummaryrefslogtreecommitdiffstats
path: root/tests/state_test.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-11 04:10:33 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:20:44 +0800
commitc5d6fcbaba545d1078f5411dc67208d5d388222e (patch)
tree20d4e6592ba8411a0ab5980522029c4aac4a8244 /tests/state_test.go
parent24554629b162d20a1f945386a45e3221c58adc2b (diff)
downloaddexon-c5d6fcbaba545d1078f5411dc67208d5d388222e.tar.gz
dexon-c5d6fcbaba545d1078f5411dc67208d5d388222e.tar.zst
dexon-c5d6fcbaba545d1078f5411dc67208d5d388222e.zip
Return error up stack instead of passing testing var down
Diffstat (limited to 'tests/state_test.go')
-rw-r--r--tests/state_test.go68
1 files changed, 51 insertions, 17 deletions
diff --git a/tests/state_test.go b/tests/state_test.go
index dbef7bd0c..5c16a3e91 100644
--- a/tests/state_test.go
+++ b/tests/state_test.go
@@ -10,62 +10,86 @@ var stateTestDir = filepath.Join(baseDir, "StateTests")
func TestStateSystemOperations(t *testing.T) {
fn := filepath.Join(stateTestDir, "stSystemOperationsTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateExample(t *testing.T) {
fn := filepath.Join(stateTestDir, "stExample.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStatePreCompiledContracts(t *testing.T) {
fn := filepath.Join(stateTestDir, "stPreCompiledContracts.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateRecursiveCreate(t *testing.T) {
fn := filepath.Join(stateTestDir, "stRecursiveCreate.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateSpecial(t *testing.T) {
fn := filepath.Join(stateTestDir, "stSpecialTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateRefund(t *testing.T) {
fn := filepath.Join(stateTestDir, "stRefundTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateBlockHash(t *testing.T) {
fn := filepath.Join(stateTestDir, "stBlockHashTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateInitCode(t *testing.T) {
fn := filepath.Join(stateTestDir, "stInitCodeTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateLog(t *testing.T) {
fn := filepath.Join(stateTestDir, "stLogTests.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateTransaction(t *testing.T) {
fn := filepath.Join(stateTestDir, "stTransactionTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestCallCreateCallCode(t *testing.T) {
fn := filepath.Join(stateTestDir, "stCallCreateCallCodeTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestMemory(t *testing.T) {
fn := filepath.Join(stateTestDir, "stMemoryTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestMemoryStress(t *testing.T) {
@@ -73,7 +97,9 @@ func TestMemoryStress(t *testing.T) {
t.Skip()
}
fn := filepath.Join(stateTestDir, "stMemoryStressTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestQuadraticComplexity(t *testing.T) {
@@ -81,22 +107,30 @@ func TestQuadraticComplexity(t *testing.T) {
t.Skip()
}
fn := filepath.Join(stateTestDir, "stQuadraticComplexityTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestSolidity(t *testing.T) {
fn := filepath.Join(stateTestDir, "stSolidityTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestWallet(t *testing.T) {
fn := filepath.Join(stateTestDir, "stWalletTest.json")
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
func TestStateTestsRandom(t *testing.T) {
fns, _ := filepath.Glob("./files/StateTests/RandomTests/*")
for _, fn := range fns {
- RunStateTest(fn, t)
+ if err := RunStateTest(fn); err != nil {
+ t.Error(err)
+ }
}
}