Commit 01ddaf56 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke

Merge pull request #1072 from Gustav-Simonsson/add_random_tests

Add StateTests/RandomTests and VMTests/RandomTests
parents f5e112ae 6ad817e1
...@@ -2,7 +2,6 @@ package vm ...@@ -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) { ...@@ -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
}
for _, fileInfo := range fileInfos {
fileNames = append(fileNames, fileInfo.Name())
} }
}
//for _, f := range fileNames { func TestVMRandom(t *testing.T) {
path := filepath.Join("../files/StateTests/RandomTests/", fileNames[0]) fns, _ := filepath.Glob("../files/VMTests/RandomTests/*")
RunVmTest(path, t) for _, fn := range fns {
//} RunVmTest(fn, t)
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment