Closed komuw closed 2 years ago
currently you have to do attest.True(t, a!=b) which does not work for all types. eg;
attest.True(t, a!=b)
type foo struct{ Name []string }
the following works;
attest.Equal(t, foo{Name: []string{"a"}}, foo{Name: []string{"a"}})
whereas the following fails to compile(invalid operation: foo{…} != foo{…} (struct containing []string cannot be compared));
invalid operation: foo{…} != foo{…} (struct containing []string cannot be compared)
attest.True(t, foo{Name: []string{"a"}} != foo{Name: []string{"b"}})
That's why I think we need a NotEqual so that we can write;`
NotEqual
attest.NotEqual(t, foo{Name: []string{"a"}}, foo{Name: []string{"b"}})
Makes sense to me! I'll add this later tonight.
currently you have to do
attest.True(t, a!=b)
which does not work for all types. eg;the following works;
whereas the following fails to compile(
invalid operation: foo{…} != foo{…} (struct containing []string cannot be compared)
);That's why I think we need a
NotEqual
so that we can write;`