vm: force neo-vm tests presence

We succeeded this test without running anything real which is certainly not
good and I think we should always run this tests.
This commit is contained in:
Roman Khimov 2019-12-04 20:30:27 +03:00
parent 2b0ad6146d
commit becd4f2333

View file

@ -89,20 +89,23 @@ const (
typeString vmUTStackItemType = "String"
typeStruct vmUTStackItemType = "Struct"
testsDir = "neo-vm/tests/neo-vm.Tests/Tests/"
testsDir = "testdata/neo-vm/tests/neo-vm.Tests/Tests/"
)
func TestUT(t *testing.T) {
testsRan := false
err := filepath.Walk(testsDir, func(path string, info os.FileInfo, err error) error {
if !strings.HasSuffix(path, ".json") {
return nil
}
testFile(t, path)
testsRan = true
return nil
})
require.NoError(t, err)
require.Equal(t, true, testsRan, "neo-vm tests should be available (check submodules)")
}
func testFile(t *testing.T, filename string) {