Skip to content

Encourage to use == instead of === for writing unit tests. #36

@HyukjinKwon

Description

@HyukjinKwon

FunSuite provides === for comparison. I see == and === are used in a mixed way across unit tests. It might be great if this is encouraged documented.

See http://www.scalatest.org/getting_started_with_fun_suite

ScalaTest lets you use Scala's assertion syntax, but defines a triple equals operator (===) to give you better error messages. The following code would give you an error indicating only that an assertion failed:

assert(1 == 2)
Using triple equals instead would give you the more informative error message, "1 did not equal 2":

assert(1 === 2)

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