Elm Exactly
Results / elm-core /

FromArrayFloatListEqualityTest

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

The values are `[1.5, 2.5, 3.5]`. Only the `==` comparison is logged; `FromArrayFloatListRoundtripTest` also logs the list itself.

Results

elm-0.19.1

passran in 67 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 61 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 64 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 71 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/FromArrayFloatListEqualityTest] in its title.

Source

The -- CHECK: lines give the expected output.

module FromArrayFloatListEqualityTest exposing (main)
{-| Converting a `List Float` to an `Array` with `Array.fromList` and back with `Array.toList` gives a list equal to the original.
The values are `[1.5, 2.5, 3.5]`. Only the `==` comparison is logged; `FromArrayFloatListRoundtripTest` also logs the list itself.
-}
-- CHECK: match: True
import Array
import Html exposing (text)
main =
let
original = [1.5, 2.5, 3.5]
roundTrip = Array.toList (Array.fromList original)
_ = Debug.log "match" (roundTrip == original)
in
text "done"