Skip to content

Commit bfbec0c

Browse files
committed
Update test
1 parent c1a8cfc commit bfbec0c

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

leetcode/0005.Longest-Palindromic-Substring/5. Longest Palindromic Substring_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ func Test_Problem5(t *testing.T) {
6161

6262
for _, q := range qs {
6363
_, p := q.ans5, q.para5
64-
fmt.Printf("【input】:%v 【output】:%v\n", p, longestPalindrome(p.s))
64+
fmt.Printf("【input】:%v 【output】:%v %v %v %v\n", p,
65+
longestPalindrome(p.s), longestPalindrome1(p.s), longestPalindrome2(p.s), longestPalindrome3(p.s))
6566
}
6667
fmt.Printf("\n\n\n")
6768
}

leetcode/0231.Power-of-Two/231. Power of Two_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ func Test_Problem231(t *testing.T) {
4646

4747
for _, q := range qs {
4848
_, p := q.ans231, q.para231
49-
fmt.Printf("【input】:%v 【output】:%v\n", p, isPowerOfTwo(p.one))
49+
fmt.Printf("【input】:%v 【output】:%v %v %v %v\n", p,
50+
isPowerOfTwo(p.one), isPowerOfTwo1(p.one), isPowerOfTwo2(p.one), isPowerOfTwo3(p.one))
5051
}
5152
fmt.Printf("\n\n\n")
5253
}

leetcode/0509.Fibonacci-Number/509. Fibonacci Number_test.go

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ func Test_Problem509(t *testing.T) {
4747

4848
for _, q := range qs {
4949
_, p := q.ans509, q.para509
50-
fmt.Printf("【input】:%v 【output】:%v\n", p, fib(p.one))
50+
// 覆盖全部解法(fib2 经 memoize、fib4 经 matrixPower/multiply、fib6 经 fibb 间接覆盖)
51+
fmt.Printf("【input】:%v 【output】:%v %v %v %v %v %v %v\n", p,
52+
fib(p.one), fib1(p.one), fib2(p.one), fib3(p.one), fib4(p.one), fib5(p.one), fib6(p.one))
5153
}
5254
fmt.Printf("\n\n\n")
5355
}

0 commit comments

Comments
 (0)