FromArrayFloatListEqualityTest
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 msOutput
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 msOutput
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 msOutput
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 msOutput
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"