We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 761469a commit 75d1e15Copy full SHA for 75d1e15
leetcode/0520.Detect-Capital/520.Detect Capital_test.go
@@ -0,0 +1,45 @@
1
+package leetcode
2
+
3
+import (
4
+ "fmt"
5
+ "testing"
6
+)
7
8
+type question520 struct {
9
+ para520
10
+ ans520
11
+}
12
13
+// para 是参数
14
+type para520 struct {
15
+ word string
16
17
18
+// ans 是答案
19
+type ans520 struct {
20
+ ans bool
21
22
23
+func Test_Problem520(t *testing.T) {
24
25
+ qs := []question520{
26
27
+ {
28
+ para520{"USA"},
29
+ ans520{true},
30
+ },
31
32
33
+ para520{"FlaG"},
34
+ ans520{false},
35
36
+ }
37
38
+ fmt.Printf("------------------------Leetcode Problem 520------------------------\n")
39
40
+ for _, q := range qs {
41
+ _, p := q.ans520, q.para520
42
+ fmt.Printf("【input】:%v 【output】:%v\n", p, detectCapitalUse(p.word))
43
44
+ fmt.Printf("\n\n\n")
45
0 commit comments