on master help sign in
Update tests for 0.14
commite82223a1d93ce20bdf7925db55a4efd06c5c4a13 authorEvan Czaplicki <info@elm-lang.org> dateFri 28 Nov 2014, 21:39 (12 years ago) parentc6d685e
13 files changed+39−40
tests/compiler/test-files/good/AliasSubstitution.elm+10−3 tests/compiler/test-files/good/Imports/OverlappingImports.elm−5 tests/compiler/test-files/good/Imports/UseHiddenTypes.elm−4 tests/compiler/test-files/good/Imports/UseRecordConstructor.elm−4 tests/compiler/test-files/good/Imports/UseTypeConstructor.elm−4 tests/compiler/test-files/good/NoExpressions.elm+2−2 tests/compiler/test-files/good/Otherwise.elm+1−1 tests/compiler/test-files/good/Ports.elm+2−2 tests/compiler/test-files/good/PortsWithTypeAliases.elm+6−2 tests/compiler/test-files/good/QuotesAndComments.elm+12−8 tests/compiler/test-files/good/Strings/Multiline.elm−2 tests/compiler/test-files/good/Strings/MultilineNormal.elm+1−2 tests/compiler/test-files/good/Unify/NonHomogeneousRecords.elm+5−1
tests/compiler/test-files/good/AliasSubstitution.elm+10−3
@@ -1,6 +1,13 @@
11
2−type Vec2Ext a = { a | x:Float, y:Float }
3−type Vec2 = Vec2Ext {}
2+
3+type alias Vec2Ext a =
4+ { a | x:Float, y:Float }
5+
6+
7+type alias Vec2 =
8+ Vec2Ext {}
9+
410
511extractVec : 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 @@
11
2−type Width = Float
3−type Height = Float
2+type alias Width = Float
3+type alias Height = Float
tests/compiler/test-files/good/Otherwise.elm+1−1
@@ -2,4 +2,4 @@ module Otherwise where
22
33otherwise = 3
44
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 @@
33port userID : String
44port signal : Signal Int
55port tuple : (Float,Bool)
6−port array : [Int]
6+port array : List Int
77port record : { x:Float, y:Float }
88
99-- outgoing
@@ -13,5 +13,5 @@ port fortyTwo = 42
1313port time : Signal Float
1414port time = every second
1515
16−port students : Signal [{name:String, age:Int}]
16+port students : Signal (List {name:String, age:Int})
1717port students = constant []
tests/compiler/test-files/good/PortsWithTypeAliases.elm+6−2
@@ -1,8 +1,12 @@
11
2−type Point2D = Point Float Float
2+type alias Point2D =
3+ Point Float Float
4+
5+type alias Point a b =
6+ { x:a, y:b }
37
4−type Point a b = { x:a, y:b }
58
69port points : Signal Point2D
710
11+
812port 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'
61
7−g = '\"'
82
9−n = '\''
3+variablesWithPrimes x =
4+ let x' = x
5+ in
6+ x'
7+
8+
9+doubleQuote = '\"'
10+
11+
12+singleQuote = '\''
13+
1014
1115{- this is an {- embeded comment -} -}
12−main = plainText "{-"
16+commentStart = "{-"
tests/compiler/test-files/good/Strings/Multiline.elm−2
@@ -2,5 +2,3 @@ s = """
22here's a quote: "
33
44"""
5−
6−main = plainText s
tests/compiler/test-files/good/Strings/MultilineNormal.elm+1−2
@@ -1,6 +1,5 @@
1+
12s = "
23here's a quote: \"
34
45"
5−
6−main = plainText s
tests/compiler/test-files/good/Unify/NonHomogeneousRecords.elm+5−1
@@ -1,5 +1,9 @@
11
2−type Thing = { x:Float, y:Float }
2+type alias Thing =
3+ { x:Float
4+ , y:Float
5+ }
6+
37
48f : Thing -> Thing
59f t =