Merge branch 'testfixes' into 'master'

Testfixes

Fixed some testing issues.

See merge request !10
This commit is contained in:
Ian Adam Naval 2014-10-16 18:53:45 -04:00
commit dd2578d084
3 changed files with 4 additions and 4 deletions

View File

@ -4,7 +4,7 @@ GOBUILD=$(GOCMD) build
GOCLEAN=$(GOCMD) clean
GOINSTALL=$(GOCMD) install
GOTEST=$(GOCMD) test
GODEP=$(GOTEST) -i
GODEP=$(GOTEST)
GOFMT=gofmt -w
GOCOVER=$(GOCMD) tool cover
COVER_DIR=cover

View File

@ -3,7 +3,7 @@ package jsh
import "testing"
func TestToJson(t *testing.T) {
fixture := JshOutput{[]string{}, []string{}}
fixture := JshFrame{[]string{}, []string{}}
json := fixture.ToJson()
expected := `{"StdOut":[],"StdErr":[]}`
actual := *json
@ -11,7 +11,7 @@ func TestToJson(t *testing.T) {
t.Errorf("Empty fixture did not match:\n%s != %s", expected, actual)
}
fixture = JshOutput{[]string{"potato!"}, []string{}}
fixture = JshFrame{[]string{"potato!"}, []string{}}
json = fixture.ToJson()
expected = `{"StdOut":["potato!"],"StdErr":[]}`
actual = *json

View File

@ -20,7 +20,7 @@ func TestNewFilesystem(t *testing.T) {
if err != nil {
t.Errorf("Passing 5 strings should not raise an error")
}
expected := Filesystem{"1", "2", "3", "4", "5"}
expected := Filesystem{"1", 2, 3, 4, "5"}
actual := *proc
if expected != actual {
t.Errorf("Filesystem was incorrectly generated:\n%s != %s", expected, actual)