Commit Graph

11 Commits (1419-fail-assertions)

Author SHA1 Message Date
Oleksandr Redko 1ee798c140 Remove canConvert because Go 1.16 is dropped from support 2023-10-10 14:28:34 +02:00
Torkel Rogstad 83198c2c50 assert: guard CanConvert call in backward compatible wrapper 2022-02-15 20:26:04 +10:00
Torkel Rogstad 087b655c75 assert: allow comparing time.Time 2022-02-15 20:26:04 +10:00
Ilia Kravets c29de71342 add tests for correct msgAndArgs forwarding
len(msgAndArgs)>1 should lead to fmt.Sprintf()
2022-02-10 20:09:05 +10:00
Menno ab6dc32628 fix linting errors in /assert package 2021-08-24 21:55:23 +10:00
Yongxin Wang bf646ea5b3 add test to check that Helper is called 2021-01-15 21:06:28 +11:00
Masaya Hayashi 1544508911 add assert positive/negative 2020-11-03 21:37:46 +11:00
Torkel Rogstad 51595dcf94 Allow comparing custom comparable types
Prior to this commit, this would not work:

```go
type myInt int
assert.Less(t, myInt(1), myInt(2)) // panic!
```

We add some type conversions, similarly to how `ObjectsAreEqualValues`
work. This allows us to compare `myInt` to `myInt`, as well as `myInt`
to `int`.
2020-06-22 19:40:53 +10:00
zjx158094 d4e7ca1687 address comments 2020-05-14 19:53:33 +10:00
zjx158094 8329c5daa7 add test 2020-05-14 19:53:33 +10:00
alexpantyukhin 6be346c1f1 rename order files to compare files 2020-03-09 08:00:09 +11:00