Skip to content

Commit 9a9cb80

Browse files
committed
Create a-number-after-a-double-reversal_test.go
1 parent fbb8b9b commit 9a9cb80

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
package leetcode_solutions_golang
2+
3+
import "testing"
4+
5+
func Test_isSameAfterReversals(t *testing.T) {
6+
type args struct {
7+
num int
8+
}
9+
tests := []struct {
10+
name string
11+
args args
12+
want bool
13+
}{
14+
{
15+
name: "test case 1",
16+
args: args{
17+
num: 123,
18+
},
19+
want: true,
20+
},
21+
{
22+
name: "test case 2",
23+
args: args{
24+
num: 1230,
25+
},
26+
want: false,
27+
},
28+
}
29+
for _, tt := range tests {
30+
t.Run(tt.name, func(t *testing.T) {
31+
if got := isSameAfterReversals(tt.args.num); got != tt.want {
32+
t.Errorf("isSameAfterReversals() = %v, want %v", got, tt.want)
33+
}
34+
})
35+
}
36+
}

0 commit comments

Comments
 (0)