From 75d1e15eef1e1772acef1f1e9dcd4092239a55ab Mon Sep 17 00:00:00 2001 From: tphyhFighting <2363176358@qq.com> Date: Sat, 13 Nov 2021 20:44:54 +0800 Subject: [PATCH] add: leetcode 0520 test --- .../520.Detect Capital_test.go | 45 +++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 leetcode/0520.Detect-Capital/520.Detect Capital_test.go diff --git a/leetcode/0520.Detect-Capital/520.Detect Capital_test.go b/leetcode/0520.Detect-Capital/520.Detect Capital_test.go new file mode 100644 index 00000000..20635849 --- /dev/null +++ b/leetcode/0520.Detect-Capital/520.Detect Capital_test.go @@ -0,0 +1,45 @@ +package leetcode + +import ( + "fmt" + "testing" +) + +type question520 struct { + para520 + ans520 +} + +// para 是参数 +type para520 struct { + word string +} + +// ans 是答案 +type ans520 struct { + ans bool +} + +func Test_Problem520(t *testing.T) { + + qs := []question520{ + + { + para520{"USA"}, + ans520{true}, + }, + + { + para520{"FlaG"}, + ans520{false}, + }, + } + + fmt.Printf("------------------------Leetcode Problem 520------------------------\n") + + for _, q := range qs { + _, p := q.ans520, q.para520 + fmt.Printf("【input】:%v 【output】:%v\n", p, detectCapitalUse(p.word)) + } + fmt.Printf("\n\n\n") +}