aboutsummaryrefslogtreecommitdiffstats
path: root/tests/transaction_test_util.go
diff options
context:
space:
mode:
authorTaylor Gerring <taylor.gerring@gmail.com>2015-06-11 05:04:06 +0800
committerTaylor Gerring <taylor.gerring@gmail.com>2015-06-19 04:20:44 +0800
commitac0637c41332de1f49fb0955f4fbe0fb908a77d5 (patch)
tree9e87e69656cc317f300ba59692eeb525a230f0bf /tests/transaction_test_util.go
parentb6d40a931286b4c998f58ad074db0a692aeace6e (diff)
downloaddexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar
dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.gz
dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.bz2
dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.lz
dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.xz
dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.tar.zst
dexon-ac0637c41332de1f49fb0955f4fbe0fb908a77d5.zip
More consistent test interfaces + test skipping
Diffstat (limited to 'tests/transaction_test_util.go')
-rw-r--r--tests/transaction_test_util.go27
1 files changed, 18 insertions, 9 deletions
diff --git a/tests/transaction_test_util.go b/tests/transaction_test_util.go
index a6cea972a..65e2c7591 100644
--- a/tests/transaction_test_util.go
+++ b/tests/transaction_test_util.go
@@ -30,20 +30,29 @@ type TransactionTest struct {
Transaction TtTransaction
}
-func RunTransactionTests(file string, notWorking map[string]bool) error {
+func RunTransactionTests(file string) error {
+ skipTest := make(map[string]bool, len(transSkipTests))
+ for _, name := range transSkipTests {
+ skipTest[name] = true
+ }
+
bt := make(map[string]TransactionTest)
if err := LoadJSON(file, &bt); err != nil {
return err
}
- for name, in := range bt {
- var err error
- // TODO: remove this, we currently ignore some tests which are broken
- if !notWorking[name] {
- if err = runTest(in); err != nil {
- return fmt.Errorf("bad test %s: %v", name, err)
- }
- fmt.Println("Transaction test passed:", name)
+
+ for name, test := range bt {
+ // if the test should be skipped, return
+ if skipTest[name] {
+ fmt.Println("Skipping state test", name)
+ return nil
+ }
+ // test the block
+ if err := runTest(test); err != nil {
+ return err
}
+ fmt.Println("Transaction test passed: ", name)
+
}
return nil
}