aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2015-05-22 05:04:46 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2015-05-22 05:04:46 +0800
commit6ad817e17b1243ada369b04eec3096403ea3499c (patch)
tree3bd6b2e95748416f0a58dea5d8af87e4d2f43bfb /tests
parent054abe20b81ada11a820405f4a42f59cea9f9199 (diff)
downloadgo-tangerine-6ad817e17b1243ada369b04eec3096403ea3499c.tar.gz
go-tangerine-6ad817e17b1243ada369b04eec3096403ea3499c.tar.zst
go-tangerine-6ad817e17b1243ada369b04eec3096403ea3499c.zip
Add StateTests/RandomTests and VMTests/RandomTests
Diffstat (limited to 'tests')
-rw-r--r--tests/vm/gh_test.go26
1 files changed, 10 insertions, 16 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index 68eb4cb45..2f76084d0 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -2,7 +2,6 @@ package vm
import (
"bytes"
- "io/ioutil"
"math/big"
"os"
"path/filepath"
@@ -373,21 +372,16 @@ func TestWallet(t *testing.T) {
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())
+func TestStateTestsRandom(t *testing.T) {
+ fns, _ := filepath.Glob("../files/StateTests/RandomTests/*")
+ for _, fn := range fns {
+ RunVmTest(fn, t)
}
+}
- //for _, f := range fileNames {
- path := filepath.Join("../files/StateTests/RandomTests/", fileNames[0])
- RunVmTest(path, t)
- //}
+func TestVMRandom(t *testing.T) {
+ fns, _ := filepath.Glob("../files/VMTests/RandomTests/*")
+ for _, fn := range fns {
+ RunVmTest(fn, t)
+ }
}