Scalactic User Guide Custom equality Default equality Constrained equality Tolerance Normalization The Explicitly DSL Or and Every Requirements Snapshots TimesOnInt |
The Explicitly DSL
Scalactic's
The Explicitly DSL can be used with the
If you want to customize equality for a type in general, you would likely want to place an
implicit // In production code: if ((result === "hello")(decided by defaultEquality)) true else false // In tests: result should equal ("hello") (decided by defaultEquality)
The explicitly DSL also provides support for specifying a one-off equality that is based on a normalization. For
example, Scalactic offers a // In production code: if ((result === "hello")(after being lowerCased)) true else false // In tests: result should equal ("hello") (after being lowerCased and trimmed) Next, learn about Or and Every. |
Scalactic is brought to you by Bill Venners, with
contributions from several other folks. It is sponsored by
Artima, Inc.
ScalaTest is free, open-source software
released under the Apache
2.0 license.
Copyright © 2009-2024 Artima, Inc. All Rights Reserved.