aboutsummaryrefslogtreecommitdiffstats
path: root/test_runner.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-01-11 22:27:08 +0800
committerobscuren <geffobscura@gmail.com>2014-01-11 22:27:08 +0800
commit9571a512861d4a44c36d368f4baa15b2aa81c37d (patch)
treec5412a119ab885570351f42e512dd2d62d0bae61 /test_runner.go
parent8bbf879cb31e9cb28700773ed788421f9935ac36 (diff)
downloadgo-tangerine-9571a512861d4a44c36d368f4baa15b2aa81c37d.tar.gz
go-tangerine-9571a512861d4a44c36d368f4baa15b2aa81c37d.tar.zst
go-tangerine-9571a512861d4a44c36d368f4baa15b2aa81c37d.zip
gofmt no coding standards
Diffstat (limited to 'test_runner.go')
-rw-r--r--test_runner.go30
1 files changed, 15 insertions, 15 deletions
diff --git a/test_runner.go b/test_runner.go
index da93533dd..e8a1698ce 100644
--- a/test_runner.go
+++ b/test_runner.go
@@ -1,35 +1,35 @@
package main
import (
- "fmt"
- "testing"
- "encoding/json"
+ "encoding/json"
+ "fmt"
+ "testing"
)
type TestSource struct {
- Inputs map[string]string
- Expectation string
+ Inputs map[string]string
+ Expectation string
}
func NewTestSource(source string) *TestSource {
- s := &TestSource{}
- err := json.Unmarshal([]byte(source), s)
- if err != nil {
- fmt.Println(err)
- }
+ s := &TestSource{}
+ err := json.Unmarshal([]byte(source), s)
+ if err != nil {
+ fmt.Println(err)
+ }
- return s
+ return s
}
type TestRunner struct {
- source *TestSource
+ source *TestSource
}
func NewTestRunner(t *testing.T) *TestRunner {
- return &TestRunner{}
+ return &TestRunner{}
}
func (runner *TestRunner) RunFromString(input string, Cb func(*TestSource)) {
- source := NewTestSource(input)
- Cb(source)
+ source := NewTestSource(input)
+ Cb(source)
}