Skip to content

Commit ebb4a9a

Browse files
committed
fix: update test coverage
1 parent 609e472 commit ebb4a9a

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

solution/1-99/0007.reverse-integer/solution_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,11 @@ func TestReverse(t *testing.T) {
2828
if reverse(x) != ret {
2929
t.Fatalf("case fails: %v\n", ret)
3030
}
31+
32+
x = 1 << 31
33+
ret = 0
34+
fmt.Printf("x = %v ret = %v\n", x, reverse(x))
35+
if reverse(x) != ret {
36+
t.Fatalf("case fails: %v\n", ret)
37+
}
3138
}

solution/1-99/0020.valid-parentheses/solution_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,11 @@ func TestIsValid(t *testing.T) {
2929
if isValid(s) != ret {
3030
t.Fatalf("case fails: %v\n", ret)
3131
}
32+
33+
s = ""
34+
ret = true
35+
fmt.Printf("x = %v ret = %v\n", s, isValid(s))
36+
if isValid(s) != ret {
37+
t.Fatalf("case fails: %v\n", ret)
38+
}
3239
}

0 commit comments

Comments
 (0)