mirror of
https://github.com/halfrost/LeetCode-Go.git
synced 2025-07-07 18:10:29 +08:00
32 lines
570 B
Go
32 lines
570 B
Go
package leetcode
|
|
|
|
import (
|
|
"fmt"
|
|
"testing"
|
|
)
|
|
|
|
func Test_Problem2166(t *testing.T) {
|
|
obj := Constructor(5)
|
|
fmt.Printf("obj = %v\n", obj)
|
|
|
|
obj.Fix(3)
|
|
fmt.Printf("obj = %v\n", obj)
|
|
obj.Fix(1)
|
|
fmt.Printf("obj = %v\n", obj)
|
|
obj.Flip()
|
|
fmt.Printf("obj = %v\n", obj)
|
|
|
|
fmt.Printf("all = %v\n", obj.All())
|
|
obj.Unfix(0)
|
|
fmt.Printf("obj = %v\n", obj)
|
|
obj.Flip()
|
|
fmt.Printf("obj = %v\n", obj)
|
|
|
|
fmt.Printf("one = %v\n", obj.One())
|
|
obj.Unfix(0)
|
|
fmt.Printf("obj = %v\n", obj)
|
|
|
|
fmt.Printf("count = %v\n", obj.Count())
|
|
fmt.Printf("toString = %v\n", obj.ToString())
|
|
}
|