Skip to content

Confusing messages for ?assertException/2 #8

Description

@andytill

Messages look like this:

 1) symbols_in_identifier_3_test/0 (test/lexer_tests.erl:28)
    Unexpected exception:
    exception error: <<"Unexepected token '^'.">>
      in function  riak_ql_lexer:yyaction/4 (src/riak_ql_lexer.erl, line 4685)
      in call from riak_ql_lexer:string/4 (src/riak_ql_lexer.erl, line 112)
      in call from riak_ql_lexer:lex/1 (src/riak_ql_lexer.erl, line 43)

For test:

symbols_in_identifier_3_test() ->
    ?assertError(
        <<"Unexpected token '^'.">>,
        error(<<"Unexepected token '^'.">>)
    ).

The exception is expected because of the assert and should show the diff for the exception reason.

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions