Elm Exactly
Results / elm-core /

FromArrayCharListEqualityTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
Converting a `List Char` to an `Array` with `Array.fromList` and back with `Array.toList` gives a list equal to the original.

Only the `==` comparison is logged; `FromArrayCharListRoundtripTest` also logs the list itself.

Results

elm-0.19.1

passran in 82 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
match: True

elm-0.19.2

passran in 55 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
match: True

elm-0.19.3

passran in 76 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
match: True

lamdera-1.5.0

passran in 53 ms
Output
match: True

Discussions

Discuss this test·Search the discussions on GitHub

Discussions are on GitHub; one about this test has [t:elm-core/FromArrayCharListEqualityTest] in its title.

Source

The -- CHECK: lines give the expected output.

module FromArrayCharListEqualityTest exposing (main)
{-| Converting a `List Char` to an `Array` with `Array.fromList` and back with `Array.toList` gives a list equal to the original.
Only the `==` comparison is logged; `FromArrayCharListRoundtripTest` also logs the list itself.
-}
-- CHECK: match: True
import Array
import Html exposing (text)
main =
let
original = ['a', 'b', 'c']
roundTrip = Array.toList (Array.fromList original)
_ = Debug.log "match" (roundTrip == original)
in
text "done"