Skip to content

Renaming test functions? #1

Open

Description

@sethaxen

Currently we have fails(f) and errors(f). I wonder if it would make more sense to rename these to test_fails(f) and test_errors(f), similar to the @test_throws, @test_broken macros provided by Test.

Perhaps even better, it would simplify user code if we make these macros so users could call @test_fails f(...) and @test_errors f(...).

Activity

  1. nickrobinson251 commented on May 19, 2023

    @nickrobinson251
    Member

    Here's some discussion on why they weren't macros to begin with:
    JuliaDiff/ChainRulesTestUtils.jl#60 (comment)

    the macro looks like @test_throws and @test_broken
    but it does not at all work like those do.

    @test_throws catchs the exception.
    @test_broken x is very similar to @test !x + some extra stuff

    I would worry that people might think @test_failure x is the same as same as @test !x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions