mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-05 00:25:22 +08:00
add leetcode_0065
This commit is contained in:
41
leetcode/0065.Valid-Number/65. Valid Number_test.go
Normal file
41
leetcode/0065.Valid-Number/65. Valid Number_test.go
Normal file
@ -0,0 +1,41 @@
|
||||
package leetcode
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func Test_Problem65(t *testing.T) {
|
||||
|
||||
tcs := []struct {
|
||||
s string
|
||||
ans bool
|
||||
}{
|
||||
|
||||
{
|
||||
"0",
|
||||
true,
|
||||
},
|
||||
|
||||
{
|
||||
"e",
|
||||
false,
|
||||
},
|
||||
|
||||
{
|
||||
".",
|
||||
false,
|
||||
},
|
||||
|
||||
{
|
||||
".1",
|
||||
true,
|
||||
},
|
||||
}
|
||||
fmt.Printf("------------------------Leetcode Problem 65------------------------\n")
|
||||
|
||||
for _, tc := range tcs {
|
||||
fmt.Printf("【input】:%v 【output】:%v\n", tc, isNumber(tc.s))
|
||||
}
|
||||
fmt.Printf("\n\n\n")
|
||||
}
|
Reference in New Issue
Block a user