gitee.com/quant1x/num@v0.3.2/count_test.go (about)

     1  package num
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestCount(t *testing.T) {
     9  	d1 := []bool{true, true}
    10  	d2 := []bool{true, false}
    11  	d3 := []uintptr{0, 1}
    12  	d4 := []int{1, 1}
    13  	d5 := []float64{1.0, 0}
    14  	fmt.Println(Count(d1))
    15  	fmt.Println(Count(d2))
    16  	fmt.Println(Count(d3))
    17  	fmt.Println(Count(d4))
    18  	fmt.Println(Count(d5))
    19  }