Tests (29)
- elm / ArrayEqualityFlagsTestTwo arrays are equal under `==` when they hold equal elements in the same order: arrays received as flags are compared, with the same elements, a different element, and a different length.
- elm / AstralCharLiteralTestA `Char` literal above U+FFFF has its full code point: `'\u{1F600}'` is 128512, and is the same character as `'😀'` written directly.
- elm / CoreIssue988NanContainerSelfEqualityTestIn Elm 0.19.1 any container holding NaN equals itself, because `(==)` first checks whether the two sides are the same object.
- elm / DeepEqualityTest`==` and `/=` give the exact answer on values nested more than 100 levels deep.
- elm / FloatEdgeTestFloat edge cases: `round` on halves, NaN in equality, `min` and `compare`, `truncate` of NaN, and an Int power beyond 2^32.
- elm / InfixPrecAppendOverEqTest`++` (precedence 5) binds more tightly than `==` (precedence 4).
- elm-core / CompareCustomWithEmptyListFieldTestOrdering and equality of a custom type whose `List Int` field may be empty.
- elm-core / CompareRecordWithEmptyListFieldTestOrdering and equality of a record whose `List Int` field may be empty.
- elm-core / CompilerIssue2362NanTupleEqualityTestA tuple holding NaN is not equal to anything, including itself.
- elm-core / ContainerEqualityCharTestChecks `==` on pairs, triples and lists of `Char`.
- elm-core / ContainerEqualityCustomFloatTestChecks `==` on custom-type values whose fields are `Float`, including NaN, infinities and negative zero.
- elm-core / ContainerEqualityFloatTestChecks `==` on pairs, triples and lists of `Float`, including NaN, infinities and negative zero.
- elm-core / ContainerEqualityIntTestChecks `==` on pairs, triples and lists of `Int`.
- elm-core / ContainerEqualityRecordFloatTestChecks `==` on records whose fields are `Float`, including NaN, infinities and negative zero.
- elm-core / ContainerEqualityStringTestChecks `==` on pairs, triples and lists of `String`.
- elm-core / CoreIssue1115NanEqualsLiteralZeroTestNaN compared with a literal `0` is not equal, on either side of `==`.
- elm-core / CoreIssue988NanEqualityReferenceTestStructural equality of values containing NaN depends on reference identity.
- elm-core / EqBoxedFastPathTestStructural equality gives the correct answer for strings, lists, tuples, records, custom types, unit, empty values, `Bool` and nested containers, through both `==` and `/=`.
- elm-core / EqualityBoolContainerTestStructural equality compares `Bool` elements inside tuples and lists correctly.
- elm-core / EqualityBoolIfTestThe result of `==` and `/=` on `Bool` operands drives an `if` expression correctly.
- elm-core / EqualityBoolMaybeTestEquality on `Maybe Bool` compares the wrapped `Bool` values and tells `Nothing` apart from `Just`.
- elm-core / EqualityBoolRecordTestRecord equality compares `Bool` fields correctly.
- elm-core / EqualityBoolTest`==` and `/=` on `Bool` literals give the correct answer for all four combinations of operands.
- elm-core / EqualityBoolVarTest`==` on `Bool` values gives the correct answer when the operands are variables or arguments rather than literals.
- elm-core / EqualityOtherConstantsTest`==` on empty and non-empty values of `String`, `List Int`, `Maybe Int` and `()` gives the right answer in both argument orders.
- elm-core / EqualityTest`==` and `/=` give the right answer on `Int` literals, and `==` is `True` for two equal `List Int` literals.
- elm-core / FloatCompareTest`<`, `>`, `<=`, `>=`, `==` and `/=` on `Float` literals, each in a case where the comparison is `True`.
- elm-core / FloatNegativeZeroTestNegative zero (`-0.0`) equals 0.0, and dividing 1.0 by it gives -Infinity while dividing by 0.0 gives Infinity.
- elm-core / IntCompareTestChecks that the six comparison operators `<`, `>`, `<=`, `>=`, `==` and `/=` give `True` on Int literals.
Discussions
Discuss this basis entry·Search the discussions on GitHub
Discussions are on GitHub; one about this basis entry has [b:Basics.eq] in its title.
A Standard Definition of Elm? (Draft version 0.4) © Rupert Smith. The text is licensed under CC BY 4.0: share and adapt it freely, with credit and a link to the licence.