Add StateTests/RandomTests and VMTests/RandomTests

This commit is contained in:
Gustav Simonsson 2015-05-21 23:04:46 +02:00
parent 054abe20b8
commit 6ad817e17b
1 changed files with 11 additions and 17 deletions

View File

@ -2,7 +2,6 @@ package vm
import ( import (
"bytes" "bytes"
"io/ioutil"
"math/big" "math/big"
"os" "os"
"path/filepath" "path/filepath"
@ -373,21 +372,16 @@ func TestWallet(t *testing.T) {
RunVmTest(fn, t) RunVmTest(fn, t)
} }
func TestRandom(t *testing.T) { func TestStateTestsRandom(t *testing.T) {
// TODO: fix JSON EOF bug and unskip fns, _ := filepath.Glob("../files/StateTests/RandomTests/*")
t.Skip() for _, fn := range fns {
fileNames := make([]string, 1024) RunVmTest(fn, t)
fileInfos, err := ioutil.ReadDir("../files/StateTests/RandomTests") }
if err != nil { }
t.Errorf("Could not read StateTests/RandomTests dir: %v", err)
return func TestVMRandom(t *testing.T) {
fns, _ := filepath.Glob("../files/VMTests/RandomTests/*")
for _, fn := range fns {
RunVmTest(fn, t)
} }
for _, fileInfo := range fileInfos {
fileNames = append(fileNames, fileInfo.Name())
}
//for _, f := range fileNames {
path := filepath.Join("../files/StateTests/RandomTests/", fileNames[0])
RunVmTest(path, t)
//}
} }