add: leetcode 0319 test

This commit is contained in:
tphyhFighting
2021-11-15 11:42:30 +08:00
parent bda179b761
commit 4fda03d823

View File

@ -0,0 +1,50 @@
package leetcode
import (
"fmt"
"testing"
)
type question319 struct {
para319
ans319
}
// para 是参数
type para319 struct {
n int
}
// ans 是答案
type ans319 struct {
ans int
}
func Test_Problem319(t *testing.T) {
qs := []question319{
{
para319{3},
ans319{1},
},
{
para319{0},
ans319{0},
},
{
para319{1},
ans319{1},
},
}
fmt.Printf("------------------------Leetcode Problem 319------------------------\n")
for _, q := range qs {
_, p := q.ans319, q.para319
fmt.Printf("【input】:%v 【output】:%v\n", p, bulbSwitch(p.n))
}
fmt.Printf("\n\n\n")
}