on master help sign in
Update tests for 0.14
e82223aEvan Czaplicki
tests/compiler/test-files/good/AliasSubstitution.elm+10−3
@@ -1,6 +1,13 @@
1
1
2+
3+type alias Vec2Ext a =
2−type Vec2Ext a = { a | x:Float, y:Float }
4+ { a | x:Float, y:Float }
5+
6+
7+type alias Vec2 =
3−type Vec2 = Vec2Ext {}
8+ Vec2Ext {}
9+
4
10
5extractVec : Vec2Ext a -> Vec2
11extractVec : Vec2Ext a -> Vec2
6−extractVec v = { x = v.x, y = v.y }
12+extractVec v =
13+ { x = v.x, y = v.y }
tests/compiler/test-files/good/Imports/OverlappingImports.elmdeleted−5
@@ -1,5 +0,0 @@
1−import Text
2−import Text (..)
3−import Text (leftAligned)
4−
5−main = leftAligned (toText "hello")
tests/compiler/test-files/good/Imports/UseHiddenTypes.elmdeleted−4
@@ -1,4 +0,0 @@
1−
2−import Imports (adt, func)
3−
4−fortyTwo = func adt
tests/compiler/test-files/good/Imports/UseRecordConstructor.elmdeleted−4
@@ -1,4 +0,0 @@
1−
2−import Imports (Point)
3−
4−point = Point 3 4
tests/compiler/test-files/good/Imports/UseTypeConstructor.elmdeleted−4
@@ -1,4 +0,0 @@
1−
2−import Imports (BooleanExpr(..), true, false)
3−
4−bool = Not true
tests/compiler/test-files/good/NoExpressions.elm+2−2
@@ -1,3 +1,3 @@
1
1
2−type Width = Float
2+type alias Width = Float
3−type Height = Float
3+type alias Height = Float
tests/compiler/test-files/good/Otherwise.elm+1−1
@@ -2,4 +2,4 @@ module Otherwise where
2
2
3otherwise = 3
3otherwise = 3
4
4
5−main = asText <| if False then "Yay" else "Boo"
5+boo = if False then "Yay" else "Boo"
tests/compiler/test-files/good/Ports.elm+2−2
@@ -3,7 +3,7 @@
3port userID : String
3port userID : String
4port signal : Signal Int
4port signal : Signal Int
5port tuple : (Float,Bool)
5port tuple : (Float,Bool)
6−port array : [Int]
6+port array : List Int
7port record : { x:Float, y:Float }
7port record : { x:Float, y:Float }
8
8
9-- outgoing
9-- outgoing
@@ -13,5 +13,5 @@ port fortyTwo = 42
13port time : Signal Float
13port time : Signal Float
14port time = every second
14port time = every second
15
15
16−port students : Signal [{name:String, age:Int}]
16+port students : Signal (List {name:String, age:Int})
17port students = constant []
17port students = constant []
tests/compiler/test-files/good/PortsWithTypeAliases.elm+6−2
@@ -1,8 +1,12 @@
1
1
2+type alias Point2D =
2−type Point2D = Point Float Float
3+ Point Float Float
4+
5+type alias Point a b =
6+ { x:a, y:b }
3
7
4−type Point a b = { x:a, y:b }
5
8
6port points : Signal Point2D
9port points : Signal Point2D
7
10
11+
8port pairs : Signal (Point String String)
12port pairs : Signal (Point String String)
tests/compiler/test-files/good/QuotesAndComments.elm+12−8
@@ -1,12 +1,16 @@
1−f x =
2− let
3− x' = x+1
4− in
5− x'
6
1
7−g = '\"'
8
2
9−n = '\''
3+variablesWithPrimes x =
4+ let x' = x
5+ in
6+ x'
7+
8+
9+doubleQuote = '\"'
10+
11+
12+singleQuote = '\''
13+
10
14
11{- this is an {- embeded comment -} -}
15{- this is an {- embeded comment -} -}
12−main = plainText "{-"
16+commentStart = "{-"
tests/compiler/test-files/good/Strings/Multiline.elm−2
@@ -2,5 +2,3 @@ s = """
2here's a quote: "
2here's a quote: "
3
3
4"""
4"""
5−
6−main = plainText s
tests/compiler/test-files/good/Strings/MultilineNormal.elm+1−2
@@ -1,6 +1,5 @@
1+
1s = "
2s = "
2here's a quote: \"
3here's a quote: \"
3
4
4"
5"
5−
6−main = plainText s
tests/compiler/test-files/good/Unify/NonHomogeneousRecords.elm+5−1
@@ -1,5 +1,9 @@
1
1
2−type Thing = { x:Float, y:Float }
2+type alias Thing =
3+ { x:Float
4+ , y:Float
5+ }
6+
3
7
4f : Thing -> Thing
8f : Thing -> Thing
5f t =
9f t =