예제 #1
0
func TestInterfacesToStrings2(t *testing.T) {
	is := make([]interface{}, 0)
	f64 := []float64{0, 1.1, 2.2, 3.3}
	exp := []string{"0", "1.1", "2.2", "3.3"}

	for _, v := range f64 {
		is = append(is, v)
	}

	got := tekstus.InterfacesToStrings(is)

	assert(t, exp, got, true)
}
예제 #2
0
func TestInterfacesToStrings(t *testing.T) {
	is := make([]interface{}, 0)
	i64 := []int64{0, 1, 2, 3}
	exp := []string{"0", "1", "2", "3"}

	for _, v := range i64 {
		is = append(is, v)
	}

	got := tekstus.InterfacesToStrings(is)

	assert(t, exp, got, true)
}