9 var _ = check.Suite(&lisSuite{})
11 func (s *lisSuite) Test(c *check.C) {
12 for _, trial := range []struct {
25 in: []int{1, 2, 3, 4},
26 out: []int{0, 1, 2, 3},
29 in: []int{1, 2, 2, 4},
33 in: []int{4, 3, 2, 1},
37 in: []int{1, 3, 2, 4},
41 in: []int{1, 0, 0, 0, 4},
45 in: []int{0, 1, 2, 1, 4, 5},
46 out: []int{0, 1, 2, 4, 5},
49 c.Logf("=== %v", trial)
50 c.Check(longestIncreasingSubsequence(len(trial.in), func(i int) int { return trial.in[i] }), check.DeepEquals, trial.out)