simple test case

This commit is contained in:
mdgriffith 2020-07-25 10:29:34 -04:00
parent 698d166bfe
commit a4f96bcd7e
2 changed files with 65 additions and 0 deletions

43
testcases/simple/Main.elm Normal file
View File

@ -0,0 +1,43 @@
module Main exposing (main)
{-| -}
import Html
type MyType
= Zero
| One Int
| Two String String
values =
[ Zero
, One 5
, Two "Two" "two"
]
many =
List.repeat 1000 values
|> List.concat
addMyType mine sum =
case mine of
Zero ->
sum
One i ->
i + sum
Two _ _ ->
sum
main =
let
sum =
List.foldl addMyType 0 many
in
Html.text (String.fromInt sum)

22
testcases/simple/elm.json Normal file
View File

@ -0,0 +1,22 @@
{
"type": "application",
"source-directories": ["."],
"elm-version": "0.19.1",
"dependencies": {
"direct": {
"elm/browser": "1.0.2",
"elm/core": "1.0.5",
"elm/html": "1.0.0"
},
"indirect": {
"elm/json": "1.1.3",
"elm/time": "1.0.0",
"elm/url": "1.0.0",
"elm/virtual-dom": "1.0.2"
}
},
"test-dependencies": {
"direct": {},
"indirect": {}
}
}