Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit ff7e2a5

Browse files
author
Adrián Catalán
committed
Add testing arch
1 parent 4c3b834 commit ff7e2a5

File tree

1 file changed

+18
-10
lines changed

1 file changed

+18
-10
lines changed
Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,21 @@
11
package src
22

3-
import (
4-
. "github.com/onsi/ginkgo"
5-
. "github.com/onsi/gomega"
6-
. "codewarrior/kata"
7-
)
3+
import "testing"
84

9-
var _ = Describe("Example Test", func() {
10-
It("should test that the solution returns the correct value", func() {
11-
Expect(HighAndLow("8 3 -5 42 -1 0 0 -9 4 7 4 -4")).To(Equal("42 -9"))
12-
})
13-
})
5+
func TestHighAndLow(t *testing.T) {
6+
tests := []struct {
7+
name string
8+
args string
9+
want string
10+
}{
11+
//{"", "8 3 -5 42 -1 0 0 -9 4 7 4 -4", "42 -9"},
12+
{"", "8 3 -5 42 -1 0 0 -9 4 7 4 -4", "throw towel"},
13+
}
14+
for _, tt := range tests {
15+
t.Run(tt.name, func(t *testing.T) {
16+
if got := HighAndLow(tt.args); got != tt.want {
17+
t.Errorf("HighAndLow() = %v, want %v", got, tt.want)
18+
}
19+
})
20+
}
21+
}

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /