on master help sign in
Reorganize test files so it is easier to find stuff
commit176fac8378bdbda7cfab3245eb8b71d27d639d97 authorEvan Czaplicki <info@elm-lang.org> dateFri 9 Oct 2015, 16:16 (11 years ago) parent7a3a447
22 files changed+41−50
tests/test-files/good-expected-js/CaseExpression3.elm.js → tests/test-files/good-expected-js/Cases/ListZip.elm.js tests/test-files/good-expected-js/VariableShadowing.elm.js → tests/test-files/good-expected-js/CodeGenBugs/Shadowing.elm.js+1−2 tests/test-files/good-expected-js/TailRecursive.elm.js → tests/test-files/good-expected-js/CodeGenBugs/TailRecursion_ListAny.elm.js+6−6 tests/test-files/good-expected-js/NoExpressions.elm.js → tests/test-files/good-expected-js/Declarations/NoDefinitions.elm.js tests/test-files/good-expected-js/Ports.elm.js → tests/test-files/good-expected-js/Declarations/Ports.elm.js tests/test-files/good-expected-js/PortsWithTypeAliases.elm.js → tests/test-files/good-expected-js/Declarations/PortsWithTypeAliases.elm.js tests/test-files/good-expected-js/Otherwise.elm.js−13 tests/test-files/good-expected-js/AliasSubstitution.elm.js → tests/test-files/good-expected-js/Records/AliasSubstitution.elm.js tests/test-files/good-expected-js/Unify/NonHomogeneousRecords.elm.js → tests/test-files/good-expected-js/Records/NonHomogeneousRecords.elm.js+8−2 tests/test-files/good-expected-js/QuotesAndComments.elm.js → tests/test-files/good-expected-js/Strings/QuotesAndComments.elm.js tests/test-files/good/CaseExpression3.elm → tests/test-files/good/Cases/ListZip.elm tests/test-files/good/VariableShadowing.elm → tests/test-files/good/CodeGenBugs/Shadowing.elm tests/test-files/good/CodeGenBugs/TailRecursion_ListAny.elm+12 tests/test-files/good/NoExpressions.elm → tests/test-files/good/Declarations/NoDefinitions.elm tests/test-files/good/Ports.elm → tests/test-files/good/Declarations/Ports.elm tests/test-files/good/PortsWithTypeAliases.elm → tests/test-files/good/Declarations/PortsWithTypeAliases.elm tests/test-files/good/Otherwise.elm−5 tests/test-files/good/AliasSubstitution.elm → tests/test-files/good/Records/AliasSubstitution.elm tests/test-files/good/Records/NonHomogeneousRecords.elm+14 tests/test-files/good/QuotesAndComments.elm → tests/test-files/good/Strings/QuotesAndComments.elm tests/test-files/good/TailRecursive.elm−10 tests/test-files/good/Unify/NonHomogeneousRecords.elm−12
tests/test-files/good-expected-js/CaseExpression3.elm.js → tests/test-files/good-expected-js/Cases/ListZip.elm.jsrenamed

The content is the same.

tests/test-files/good-expected-js/VariableShadowing.elm.js → tests/test-files/good-expected-js/CodeGenBugs/Shadowing.elm.jsrenamed+1−2
@@ -11,8 +11,7 @@ Elm.Main.make = function (_elm) {
1111 if (_p0.ctor === "First") {
1212 return "True";
1313 } else {
14− var a = _p0._0,b = _p0._1;
15− return a;
14+ return _p0._0;
1615 }
1716 }();
1817 return name;
tests/test-files/good-expected-js/TailRecursive.elm.js → tests/test-files/good-expected-js/CodeGenBugs/TailRecursion_ListAny.elm.jsrenamed+6−6
@@ -5,14 +5,14 @@ Elm.Main.make = function (_elm) {
55 if (_elm.Main.values) return _elm.Main.values;
66 var _U = Elm.Native.Utils.make(_elm);
77 var _op = {};
8− var any = F2(function (f,l) {
8+ var any = F2(function (isOk,list) {
99 any: while (true) {
10− var _p0 = l;
10+ var _p0 = list;
1111 if (_p0.ctor === "::") {
12− if (f(_p0._0)) return true; else {
13− var _v1 = f,_v2 = _p0._1;
14− f = _v1;
15− l = _v2;
12+ if (isOk(_p0._0)) return true; else {
13+ var _v1 = isOk,_v2 = _p0._1;
14+ isOk = _v1;
15+ list = _v2;
1616 continue any;
1717 }
1818 } else {
tests/test-files/good-expected-js/NoExpressions.elm.js → tests/test-files/good-expected-js/Declarations/NoDefinitions.elm.jsrenamed

The content is the same.

tests/test-files/good-expected-js/Ports.elm.js → tests/test-files/good-expected-js/Declarations/Ports.elm.jsrenamed

The content is the same.

tests/test-files/good-expected-js/PortsWithTypeAliases.elm.js → tests/test-files/good-expected-js/Declarations/PortsWithTypeAliases.elm.jsrenamed

The content is the same.

tests/test-files/good-expected-js/Otherwise.elm.jsdeleted−13
@@ -1,13 +0,0 @@
1−Elm.Otherwise = Elm.Otherwise || {};
2−Elm.Otherwise.make = function (_elm) {
3− "use strict";
4− _elm.Otherwise = _elm.Otherwise || {};
5− if (_elm.Otherwise.values) return _elm.Otherwise.values;
6− var _U = Elm.Native.Utils.make(_elm);
7− var _op = {};
8− var boo = false ? "Yay" : "Boo";
9− var otherwise = 3;
10− return _elm.Otherwise.values = {_op: _op
11− ,otherwise: otherwise
12− ,boo: boo};
13−};
tests/test-files/good-expected-js/AliasSubstitution.elm.js → tests/test-files/good-expected-js/Records/AliasSubstitution.elm.jsrenamed

The content is the same.

tests/test-files/good-expected-js/Unify/NonHomogeneousRecords.elm.js → tests/test-files/good-expected-js/Records/NonHomogeneousRecords.elm.jsrenamed+8−2
@@ -5,7 +5,13 @@ Elm.Main.make = function (_elm) {
55 if (_elm.Main.values) return _elm.Main.values;
66 var _U = Elm.Native.Utils.make(_elm);
77 var _op = {};
8− var f = function (t) { var y = t.y;var x = t.x;return t;};
8+ var bindFields = function (thing) {
9+ var y = thing.y;
10+ var x = thing.x;
11+ return thing;
12+ };
913 var Thing = F2(function (a,b) { return {x: a,y: b};});
10− return _elm.Main.values = {_op: _op,Thing: Thing,f: f};
14+ return _elm.Main.values = {_op: _op
15+ ,Thing: Thing
16+ ,bindFields: bindFields};
1117};
tests/test-files/good-expected-js/QuotesAndComments.elm.js → tests/test-files/good-expected-js/Strings/QuotesAndComments.elm.jsrenamed

The content is the same.

tests/test-files/good/CaseExpression3.elm → tests/test-files/good/Cases/ListZip.elmrenamed

The content is the same.

tests/test-files/good/VariableShadowing.elm → tests/test-files/good/CodeGenBugs/Shadowing.elmrenamed

The content is the same.

tests/test-files/good/CodeGenBugs/TailRecursion_ListAny.elmnew file+12
@@ -0,0 +1,12 @@
1+
2+any isOk list =
3+ case list of
4+ first :: rest ->
5+ if isOk first then
6+ True
7+
8+ else
9+ any isOk rest
10+
11+ _ ->
12+ False
tests/test-files/good/NoExpressions.elm → tests/test-files/good/Declarations/NoDefinitions.elmrenamed

The content is the same.

tests/test-files/good/Ports.elm → tests/test-files/good/Declarations/Ports.elmrenamed

The content is the same.

tests/test-files/good/PortsWithTypeAliases.elm → tests/test-files/good/Declarations/PortsWithTypeAliases.elmrenamed

The content is the same.

tests/test-files/good/Otherwise.elmdeleted−5
@@ -1,5 +0,0 @@
1−module Otherwise where
2−
3−otherwise = 3
4−
5−boo = if False then "Yay" else "Boo"
tests/test-files/good/AliasSubstitution.elm → tests/test-files/good/Records/AliasSubstitution.elmrenamed

The content is the same.

tests/test-files/good/Records/NonHomogeneousRecords.elmnew file+14
@@ -0,0 +1,14 @@
1+
2+type alias Thing =
3+ { x : Float
4+ , y : Float
5+ }
6+
7+
8+bindFields : Thing -> Thing
9+bindFields thing =
10+ let
11+ x = thing.x
12+ y = thing.y
13+ in
14+ thing
tests/test-files/good/QuotesAndComments.elm → tests/test-files/good/Strings/QuotesAndComments.elmrenamed

The content is the same.

tests/test-files/good/TailRecursive.elmdeleted−10
@@ -1,10 +0,0 @@
1−
2−any f l =
3− case l of
4− x :: xs ->
5− if f x then
6− True
7− else
8− any f xs
9− _ ->
10− False
tests/test-files/good/Unify/NonHomogeneousRecords.elmdeleted−12
@@ -1,12 +0,0 @@
1−
2−type alias Thing =
3− { x:Float
4− , y:Float
5− }
6−
7−
8−f : Thing -> Thing
9−f t =
10− let x = t.x
11− y = t.y
12− in t