shader: Bug fix: Skip tests on browsers

With wasmbrowsertest, file system is not available.
This commit is contained in:
Hajime Hoshi 2020-06-08 12:31:50 +09:00
parent 91fb8e92d8
commit d0027ebc5f

View File

@ -19,6 +19,7 @@ import (
"go/token" "go/token"
"io/ioutil" "io/ioutil"
"path/filepath" "path/filepath"
"runtime"
"strings" "strings"
"testing" "testing"
@ -26,6 +27,10 @@ import (
) )
func TestCompile(t *testing.T) { func TestCompile(t *testing.T) {
if runtime.GOOS == "js" {
t.Skip("file open might not be implemented in this environment")
}
files, err := ioutil.ReadDir("testdata") files, err := ioutil.ReadDir("testdata")
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)