Skip to content

Return a bool from assertions #4

@goodevilgenius

Description

@goodevilgenius

Testify's library comes with two flavors: assert and require. be is essentially just assert, which is reasonable given the design goal of having a low footprint.

But, if we need to require, you could return a bool from each method to indicate success/failure, and then we could do:

if !be.Err(t, err, nil) {
  t.FailNow()
}

In this case, we can ignore the return if we don't need it, or check it if we do.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions