// TestInitFilteredList tests InitFilteredList
func TestFilterList(t *testing.T) {
	var tt = []goutils.TTIA{
		{6, []int{60}},
	}

	for i := 0; i < len(tt); i++ {
		testIn := goutils.FilterList(tt[i].Test)
		testExp := tt[i].Expt

		if goutils.ArrayEqual(testExp, testIn) {
			t.SkipNow()
		} else {
			t.Error("Test failed")
		}
	}
}
Exemplo n.º 2
0
// Euler5 solution
func Euler5(p int) int {
	allProducts := goutils.FilterList(p)
	return allProducts[0]
}