aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-05-16 01:17:40 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-05-16 01:17:40 +0800
commit619e8a4f0334560fdfa1f525fa1a8389ce13811e (patch)
tree27ed1abc5ef485a0a07e01bafdfe619cb0a86997
parent32276e8b01a16840df38aa4b703ab9b2be5b8c74 (diff)
downloaddexon-619e8a4f0334560fdfa1f525fa1a8389ce13811e.tar.gz
dexon-619e8a4f0334560fdfa1f525fa1a8389ce13811e.tar.zst
dexon-619e8a4f0334560fdfa1f525fa1a8389ce13811e.zip
Add StateTests/RandomTests but skip for now
-rw-r--r--tests/vm/gh_test.go21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index 2f0d058e3..838050fa1 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -2,7 +2,9 @@ package vm
import (
"bytes"
+ "io/ioutil"
"math/big"
+ "path/filepath"
"strconv"
"testing"
@@ -360,3 +362,22 @@ func TestWallet(t *testing.T) {
const fn = "../files/StateTests/stWalletTest.json"
RunVmTest(fn, t)
}
+
+func TestRandom(t *testing.T) {
+ // TODO: fix JSON EOF bug and unskip
+ t.Skip()
+ fileNames := make([]string, 1024)
+ fileInfos, err := ioutil.ReadDir("../files/StateTests/RandomTests")
+ if err != nil {
+ t.Errorf("Could not read StateTests/RandomTests dir: %v", err)
+ return
+ }
+ for _, fileInfo := range fileInfos {
+ fileNames = append(fileNames, fileInfo.Name())
+ }
+
+ //for _, f := range fileNames {
+ path := filepath.Join("../files/StateTests/RandomTests/", fileNames[0])
+ RunVmTest(path, t)
+ //}
+}