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

     1  package num
     2  
     3  import (
     4  	"fmt"
     5  	"testing"
     6  )
     7  
     8  func TestMinimum(t *testing.T) {
     9  	f1 := []float32{1.1, 2.2, 1.3, 1.4}
    10  	f2 := []float32{1.2, 1.2, 3.3}
    11  	fmt.Println(Minimum(f1, f2))
    12  	fmt.Println(Minimum([]float64{1.0}, []float64{1.0}))
    13  	fmt.Println(Minimum([]int{1}, []int{1}))
    14  	fmt.Println(Minimum([]int{1}, []int{2}))
    15  	fmt.Println(Minimum([]int{2}, []int{1, 2, 3}))
    16  	fmt.Println(Minimum([]int{1, 2, 3, 4, 5}, []int{2}))
    17  }