ListSortByFloatIdentityTest
Checks `List.sortBy identity` on a `List Float`, by printing the sorted list and comparing it with `[1.0, 2.0, 3.0]`.
Results
elm-0.19.1
passran in 71 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. result: [1,2,3] match: True
elm-0.19.2
passran in 64 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. result: [1,2,3] match: True
elm-0.19.3
passran in 78 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. result: [1,2,3] match: True
lamdera-1.5.0
passran in 57 msOutput
result: [1,2,3] match: True
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/ListSortByFloatIdentityTest] in its title.
Source
The -- CHECK: lines give the expected output.
module ListSortByFloatIdentityTest exposing (main)
{-| Checks `List.sortBy identity` on a `List Float`, by printing the sorted list
and comparing it with `[1.0, 2.0, 3.0]`.
-}
-- CHECK: result: [1,2,3]
-- CHECK: match: True
import Html exposing (text)
main =
let
result =
List.sortBy identity [ 3.0, 1.0, 2.0 ]
_ =
Debug.log "result" result
_ =
Debug.log "match" (result == [ 1.0, 2.0, 3.0 ])
in
text "done"