Elm Exactly
Results / elm-core /

FromArrayCharListRoundtripTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
Converting `['a', 'b', 'c']` to an `Array` with `Array.fromList` and back with `Array.toList` gives the same list.

The test logs the reconstructed list as well as the result of comparing it with the original.

Results

elm-0.19.1

passran in 76 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets.
result: ['a','b','c']
match: True

elm-0.19.2

passran in 81 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets.
result: ['a','b','c']
match: True

elm-0.19.3

passran in 73 ms
Output
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets.
result: ['a','b','c']
match: True

lamdera-1.5.0

passran in 54 ms
Output
result: ['a','b','c']
match: True

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module FromArrayCharListRoundtripTest exposing (main)
{-| Converting `['a', 'b', 'c']` to an `Array` with `Array.fromList` and back with `Array.toList` gives the same list.
The test logs the reconstructed list as well as the result of comparing it with the original.
-}
-- CHECK: result: ['a','b','c']
-- CHECK: match: True
import Array
import Html exposing (text)
main =
let
original = ['a', 'b', 'c']
roundTrip = Array.toList (Array.fromList original)
_ = Debug.log "result" roundTrip
_ = Debug.log "match" (roundTrip == original)
in
text "done"