good morning!!!!

Skip to content
Snippets Groups Projects
Commit 01ddaf56 authored by Jeffrey Wilcke's avatar Jeffrey Wilcke
Browse files

Merge pull request #1072 from Gustav-Simonsson/add_random_tests

Add StateTests/RandomTests and VMTests/RandomTests
parents f5e112ae 6ad817e1
Branches
Tags
No related merge requests found
......@@ -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
func TestStateTestsRandom(t *testing.T) {
fns, _ := filepath.Glob("../files/StateTests/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)
//}
func TestVMRandom(t *testing.T) {
fns, _ := filepath.Glob("../files/VMTests/RandomTests/*")
for _, fn := range fns {
RunVmTest(fn, t)
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment