MCPcopy
hub / github.com/gogf/gf / AssertNE

Function AssertNE

test/gtest/gtest_util.go:87–105  ·  view source on GitHub ↗

AssertNE checks `value` and `expect` NOT EQUAL.

(value, expect any)

Source from the content-addressed store, hash-verified

85
86// AssertNE checks `value` and `expect` NOT EQUAL.
87func AssertNE(value, expect any) {
88 rvExpect := reflect.ValueOf(expect)
89 if empty.IsNil(value) {
90 value = nil
91 }
92 if rvExpect.Kind() == reflect.Map {
93 if err := compareMap(value, expect); err == nil {
94 panic(fmt.Sprintf(`[ASSERT] EXPECT %v != %v`, value, expect))
95 }
96 return
97 }
98 var (
99 strValue = gconv.String(value)
100 strExpect = gconv.String(expect)
101 )
102 if strValue == strExpect {
103 panic(fmt.Sprintf(`[ASSERT] EXPECT %v != %v`, strValue, strExpect))
104 }
105}
106
107// AssertNQ checks `value` and `expect` NOT EQUAL, including their TYPES.
108func AssertNQ(value, expect any) {

Callers 15

Test_DB_SaveFunction · 0.92
Test_TableFieldsFunction · 0.92
TestTableFieldsFunction · 0.92
Test_Table_FieldsFunction · 0.92
TestTableFieldsFunction · 0.92
TestDoInsertFunction · 0.92
clickhouseConfigDBFunction · 0.92
clickhouseLinkFunction · 0.92
TestDriverClickhouse_NewFunction · 0.92

Calls 4

IsNilFunction · 0.92
StringFunction · 0.92
compareMapFunction · 0.85
KindMethod · 0.80

Tested by 15

Test_DB_SaveFunction · 0.74
Test_TableFieldsFunction · 0.74
TestTableFieldsFunction · 0.74
Test_Table_FieldsFunction · 0.74
TestTableFieldsFunction · 0.74
TestDoInsertFunction · 0.74
clickhouseConfigDBFunction · 0.74
clickhouseLinkFunction · 0.74
TestDriverClickhouse_NewFunction · 0.74

Used in the wild real call sites across dependent graphs

searching dependent graphs…