Exemple #1
0
func (s *HelpersS) TestMkDir(c *gocheck.C) {
	helper := MkDirHelper{}
	output := String{}
	gocheck.Run(&helper, &gocheck.RunConf{Output: &output})
	c.Assert(output.value, gocheck.Equals, "")
	c.Check(helper.isDir1, gocheck.Equals, true)
	c.Check(helper.isDir2, gocheck.Equals, true)
	c.Check(helper.isDir3, gocheck.Equals, true)
	c.Check(helper.isDir4, gocheck.Equals, true)
	c.Check(helper.path1, gocheck.Not(gocheck.Equals),
		helper.path2)
	c.Check(isDir(helper.path1), gocheck.Equals, false)
	c.Check(isDir(helper.path2), gocheck.Equals, false)
}
Exemple #2
0
func (s *CheckersS) TestNot(c *gocheck.C) {
	testInfo(c, gocheck.Not(gocheck.IsNil), "Not(IsNil)", "value", "")

	testCheck(c, gocheck.Not(gocheck.IsNil), nil, nil, false, "")
	testCheck(c, gocheck.Not(gocheck.IsNil), "a", nil, true, "")
}