Пример #1
0
func (s *HelpersS) TestCheckNotEqualArrayFailing(c *gocheck.C) {
	log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
		"\\.+ CheckNotEqual\\(obtained, unexpected\\):\n" +
		"\\.+ Both \\(\\[\\]uint8\\): \\[\\]byte{0x1, 0x2}\n\n"
	testHelperFailure(c, "CheckNotEqual([]byte{2}, []byte{3})", false, false,
		log, func() interface{} {
			return c.CheckNotEqual([]byte{1, 2}, []byte{1, 2})
		})
}
Пример #2
0
func (s *HelpersS) TestCheckNotEqualFailing(c *gocheck.C) {
	log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
		"\\.+ CheckNotEqual\\(obtained, unexpected\\):\n" +
		"\\.+ Both \\(int\\): 10\n\n"
	testHelperFailure(c, "CheckNotEqual(10, 10)", false, false, log,
		func() interface{} {
			return c.CheckNotEqual(10, 10)
		})
}
Пример #3
0
func (s *HelpersS) TestCheckNotEqualWithBugInfo(c *gocheck.C) {
	log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
		"\\.+ CheckNotEqual\\(obtained, unexpected\\):\n" +
		"\\.+ Both \\(int\\): 10\n" +
		"\\.+ That's clearly WRONG!\n\n"
	testHelperFailure(c, "CheckNotEqual(10, 10, issue)", false, false, log,
		func() interface{} {
			return c.CheckNotEqual(10, 10, "That's clearly ", "WRONG!")
		})
}
Пример #4
0
func (s *HelpersS) TestCheckNotEqualArraySucceeding(c *gocheck.C) {
	testHelperSuccess(c, "CheckNotEqual([]byte, []byte)", true,
		func() interface{} {
			return c.CheckNotEqual([]byte{1, 2}, []byte{1, 3})
		})
}
Пример #5
0
func (s *HelpersS) TestCheckNotEqualSucceedingWithNil(c *gocheck.C) {
	testHelperSuccess(c, "CheckNotEqual(10, nil)", true, func() interface{} {
		return c.CheckNotEqual(10, nil)
	})
}