示例#1
0
func assertToolsList(c *C, list tools.List, expected []version.Binary) {
	urls := list.URLs()
	c.Check(urls, HasLen, len(expected))
	for _, vers := range expected {
		c.Assert(urls[vers], Not(Equals), "")
	}
}
示例#2
0
func (s *ListSuite) TestURLs(c *C) {
	empty := tools.List{}
	c.Check(empty.URLs(), DeepEquals, map[version.Binary]string{})

	full := tools.List{t100precise, t190quantal, t2001precise}
	c.Check(full.URLs(), DeepEquals, map[version.Binary]string{
		t100precise.Binary:  t100precise.URL,
		t190quantal.Binary:  t190quantal.URL,
		t2001precise.Binary: t2001precise.URL,
	})
}