Elm Exactly
Results / elm-parser /

ParserSymbolTest

elm-0.19.1 passelm-0.19.2 passelm-0.19.3 passlamdera-1.5.0 pass
Checks that `Parser.symbol` matches one-character and two-character symbols.

`symbol "="` succeeds on `"="` and `symbol "=="` succeeds on `"=="`.

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.
single: True
double: True

elm-0.19.2

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

elm-0.19.3

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

lamdera-1.5.0

passran in 48 ms
Output
single: True
double: True

Discussions

Discuss this test·Search the discussions on GitHub

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

Source

The -- CHECK: lines give the expected output.

module ParserSymbolTest exposing (main)
{-| Checks that `Parser.symbol` matches one-character and two-character symbols.
`symbol "="` succeeds on `"="` and `symbol "=="` succeeds on `"=="`.
-}
-- CHECK: single: True
-- CHECK: double: True
import Html exposing (text)
import Parser
main =
let
single = Parser.run (Parser.symbol "=") "="
_ = Debug.log "single"
(case single of
Ok _ -> True
Err _ -> False
)
double = Parser.run (Parser.symbol "==") "=="
_ = Debug.log "double"
(case double of
Ok _ -> True
Err _ -> False
)
in
text "done"