From a4f96bcd7efe5e0c462d3e4ba897c22318c6b9e3 Mon Sep 17 00:00:00 2001 From: mdgriffith Date: Sat, 25 Jul 2020 10:29:34 -0400 Subject: [PATCH] simple test case --- testcases/simple/Main.elm | 43 +++++++++++++++++++++++++++++++++++++++ testcases/simple/elm.json | 22 ++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 testcases/simple/Main.elm create mode 100644 testcases/simple/elm.json diff --git a/testcases/simple/Main.elm b/testcases/simple/Main.elm new file mode 100644 index 0000000..4d022b4 --- /dev/null +++ b/testcases/simple/Main.elm @@ -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) diff --git a/testcases/simple/elm.json b/testcases/simple/elm.json new file mode 100644 index 0000000..8510010 --- /dev/null +++ b/testcases/simple/elm.json @@ -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": {} + } +}