StringRepeatTest
Checks that `String.repeat` concatenates `n` copies of a string, giving the empty string when `n` is 0.
Results
elm-0.19.1
passran in 70 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.1/optimize for better performance and smaller assets. repeat1: "abcabcabc" repeat_zero: ""
elm-0.19.2
passran in 51 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.2/optimize for better performance and smaller assets. repeat1: "abcabcabc" repeat_zero: ""
elm-0.19.3
passran in 56 msOutput
Compiled in DEV mode. Follow the advice at https://elm-lang.org/0.19.3/optimize for better performance and smaller assets. repeat1: "abcabcabc" repeat_zero: ""
lamdera-1.5.0
passran in 55 msOutput
repeat1: "abcabcabc" repeat_zero: ""
Discussions
Discuss this test·Search the discussions on GitHub
Discussions are on GitHub; one about this test has [t:elm-core/StringRepeatTest] in its title.
Source
The -- CHECK: lines give the expected output.
module StringRepeatTest exposing (main)
{-| Checks that `String.repeat` concatenates `n` copies of a string, giving the empty string when `n` is 0.
-}
-- CHECK: repeat1: "abcabcabc"
-- CHECK: repeat_zero: ""
import Html exposing (text)
main =
let
_ = Debug.log "repeat1" (String.repeat 3 "abc")
_ = Debug.log "repeat_zero" (String.repeat 0 "abc")
in
text "done"