Add extends tests for new qualifying algorithm #13

Closed
lunny wants to merge 2 commits from unknown repository into master
Owner

Author: @gavv

We need this PR for go-xorm/xorm#398

Author: @gavv We need this PR for go-xorm/xorm#398
Author
Owner

Author: @gavv

What do you think about using testify for xorm tests?

I think it would reduce code size dramatically, e.g. you can replace:

if list[0].Sender != e.sender {
    err := errors.New(fmt.Sprintln("should sender equal", list[0].Sender, e.sender))
    t.Error(err)
    panic(err)
}

with:

require.Equal(t, e.sender, list[0].Sender)

require.Equal will produce nice error message (with compact diff and backtrace) on failure and terminate test.

Author: @gavv What do you think about using [`testify`](https://github.com/stretchr/testify/) for xorm tests? I think it would reduce code size dramatically, e.g. you can replace: ``` go if list[0].Sender != e.sender { err := errors.New(fmt.Sprintln("should sender equal", list[0].Sender, e.sender)) t.Error(err) panic(err) } ``` with: ``` go require.Equal(t, e.sender, list[0].Sender) ``` `require.Equal` will produce nice error message (with compact diff and backtrace) on failure and terminate test.
Author
Owner

Author: @lunny

Looks like testify is a good idea.

Author: @lunny Looks like testify is a good idea.
This repo is archived. You cannot comment on pull requests.
No reviewers
No Milestone
No Assignees
1 Participants
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: xorm/tests#13
No description provided.