本文整理汇总了Golang中gocheck.C.AssertNotEqual方法的典型用法代码示例。如果您正苦于以下问题:Golang C.AssertNotEqual方法的具体用法?Golang C.AssertNotEqual怎么用?Golang C.AssertNotEqual使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类gocheck.C
的用法示例。
在下文中一共展示了C.AssertNotEqual方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Golang代码示例。
示例1: TestAssertNotEqualArraySucceeding
func (s *HelpersS) TestAssertNotEqualArraySucceeding(c *gocheck.C) {
testHelperSuccess(c, "AssertNotEqual([]byte, []byte)", nil,
func() interface{} {
c.AssertNotEqual([]byte{1, 2}, []byte{1, 3})
return nil
})
}
示例2: TestAssertNotEqualArrayFailing
func (s *HelpersS) TestAssertNotEqualArrayFailing(c *gocheck.C) {
log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
"\\.+ AssertNotEqual\\(obtained, unexpected\\):\n" +
"\\.+ Both \\(\\[\\]uint8\\): \\[\\]byte{0x1, 0x2}\n\n"
testHelperFailure(c, "AssertNotEqual([]byte{2}, []byte{3})", nil, true,
log, func() interface{} {
c.AssertNotEqual([]byte{1, 2}, []byte{1, 2})
return nil
})
}
示例3: TestAssertNotEqualFailing
func (s *HelpersS) TestAssertNotEqualFailing(c *gocheck.C) {
log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
"\\.+ AssertNotEqual\\(obtained, unexpected\\):\n" +
"\\.+ Both \\(int\\): 10\n\n"
testHelperFailure(c, "AssertNotEqual(10, 10)", nil, true, log,
func() interface{} {
c.AssertNotEqual(10, 10)
return nil
})
}
示例4: TestAssertNotEqualWithMessage
func (s *HelpersS) TestAssertNotEqualWithMessage(c *gocheck.C) {
log := "helpers_test.go:[0-9]+ > helpers_test.go:[0-9]+:\n" +
"\\.+ AssertNotEqual\\(obtained, unexpected\\):\n" +
"\\.+ Both \\(int\\): 10\n" +
"\\.+ That's clearly WRONG!\n\n"
testHelperFailure(c, "AssertNotEqual(10, 10, issue)", nil, true, log,
func() interface{} {
c.AssertNotEqual(10, 10, "That's clearly ", "WRONG!")
return nil
})
}
示例5: TestAssertNotEqualSucceeding
func (s *HelpersS) TestAssertNotEqualSucceeding(c *gocheck.C) {
testHelperSuccess(c, "AssertNotEqual(10, 20)", nil, func() interface{} {
c.AssertNotEqual(10, 20)
return nil
})
}