diff options
author | zelig <viktor.tron@gmail.com> | 2015-03-25 22:58:52 +0800 |
---|---|---|
committer | zelig <viktor.tron@gmail.com> | 2015-03-27 03:00:18 +0800 |
commit | 4ec38e39320ee9abccd96da765a9c65fccd04151 (patch) | |
tree | 3f57aebae8bd42f766b80a3db5e3b22328e9a181 /jsre | |
parent | 23e41a57ad7e7cb4bc5a1cbad28bbf8d65907fdd (diff) | |
download | go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.tar go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.tar.gz go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.tar.bz2 go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.tar.lz go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.tar.xz go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.tar.zst go-tangerine-4ec38e39320ee9abccd96da765a9c65fccd04151.zip |
common: remove WriteFile and ReadAllFile (use ioutil instead)
Diffstat (limited to 'jsre')
-rw-r--r-- | jsre/jsre_test.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jsre/jsre_test.go b/jsre/jsre_test.go index 8a771dae8..667ed4bdc 100644 --- a/jsre/jsre_test.go +++ b/jsre/jsre_test.go @@ -2,9 +2,9 @@ package jsre import ( "github.com/robertkrimen/otto" + "io/ioutil" + "os" "testing" - - "github.com/ethereum/go-ethereum/common" ) type testNativeObjectBinding struct { @@ -26,7 +26,7 @@ func (no *testNativeObjectBinding) TestMethod(call otto.FunctionCall) otto.Value func TestExec(t *testing.T) { jsre := New("/tmp") - common.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`)) + ioutil.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`), os.ModePerm) err := jsre.Exec("test.js") if err != nil { t.Errorf("expected no error, got %v", err) @@ -64,7 +64,7 @@ func TestBind(t *testing.T) { func TestLoadScript(t *testing.T) { jsre := New("/tmp") - common.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`)) + ioutil.WriteFile("/tmp/test.js", []byte(`msg = "testMsg"`), os.ModePerm) _, err := jsre.Run(`loadScript("test.js")`) if err != nil { t.Errorf("expected no error, got %v", err) |