Please, think about additional assert types
Currently we have next asserts:
- Contains
- Equal
- NotEqual
- Length
- GreaterThan
- LessThan
- Present
- NotPresent
Please, think to add next assert types:
- GreaterEqual
- LessEqual
- AssertArray
It seems that if you add GreaterOrEqualThan then GreaterThan behaviour becomes wrong, it doesn't return an error on Equal case. Also LessOrEqualThen.
I could add these features, but then I'd have to break backwards compatibility, right?
So, now GreaterThani is assert only for array. It's my mistake. I think. if we add comparing(equal) for numbers with error on zero case, it will be ok
I didn't see how that would help. Here is an example of what I was talking about:
assert.Greater(t, 3, 3) // testify FAIL "3" is not greater than "3"
GreaterThan("$.o", 3)([]byte(`{"o":["a", "b", "c"]}`)) // ok
So, If you add GreaterOrEqualThan, behaviour of GreaterThan should change to FAIL
Sorry for long answer. My point is need to copy logic assertion from assert package and implement it. If it will break backwards compatibility, it's ok.
Thank you @shalimski for https://github.com/ozontech/cute/pull/18