[Git][ghc/ghc][wip/T18599] add to testsuite

Shayne Fletcher gitlab at gitlab.haskell.org
Sun Sep 20 00:23:17 UTC 2020



Shayne Fletcher pushed to branch wip/T18599 at Glasgow Haskell Compiler / GHC


Commits:
bcde79d5 by Shayne Fletcher at 2020-09-19T20:22:58-04:00
add to testsuite

- - - - -


8 changed files:

- record-dot-syntax-tests/Construction.hs → testsuite/tests/parser/should_fail/RecordDotSyntaxFail0.hs
- + testsuite/tests/parser/should_fail/RecordDotSyntaxFail0.stderr
- record-dot-syntax-tests/Pattern.hs → testsuite/tests/parser/should_fail/RecordDotSyntaxFail1.hs
- + testsuite/tests/parser/should_fail/RecordDotSyntaxFail1.stderr
- testsuite/tests/parser/should_fail/all.T
- record-dot-syntax-tests/Test.hs → testsuite/tests/parser/should_run/RecordDotSyntax.hs
- + testsuite/tests/parser/should_run/RecordDotSyntax.stdout
- testsuite/tests/parser/should_run/all.T


Changes:

=====================================
record-dot-syntax-tests/Construction.hs → testsuite/tests/parser/should_fail/RecordDotSyntaxFail0.hs
=====================================


=====================================
testsuite/tests/parser/should_fail/RecordDotSyntaxFail0.stderr
=====================================
@@ -0,0 +1,5 @@
+ghc: panic! (the 'impossible' happened)
+  (GHC version 8.11.0.20200909:
+	fbindToRecField: The impossible happened
+
+Please report this as a GHC bug:  https://www.haskell.org/ghc/reportabug


=====================================
record-dot-syntax-tests/Pattern.hs → testsuite/tests/parser/should_fail/RecordDotSyntaxFail1.hs
=====================================


=====================================
testsuite/tests/parser/should_fail/RecordDotSyntaxFail1.stderr
=====================================
@@ -0,0 +1,2 @@
+RecordDotSyntaxFail1.hs:3:10:
+    Field selector syntax is not supported in patterns.


=====================================
testsuite/tests/parser/should_fail/all.T
=====================================
@@ -173,3 +173,5 @@ test('T18251c', normal, compile_fail, [''])
 test('T18251d', normal, compile_fail, [''])
 test('T18251e', normal, compile_fail, [''])
 test('T18251f', normal, compile_fail, [''])
+test('RecordDotSyntaxFail0', normal, compile_fail, [''])
+test('RecordDotSyntaxFail1', normal, compile_fail, [''])


=====================================
record-dot-syntax-tests/Test.hs → testsuite/tests/parser/should_run/RecordDotSyntax.hs
=====================================
@@ -112,4 +112,4 @@ main = do
   g <- pure a
   print $ c{f} -- 42, 1
   print $ c{f, g} -- 42, 42
-  print $ c{f, g.foo.bar.baz.quux = 4} -- Can now mix top-level and nested updates!; 42, 4
+  print $ c{f, g.foo.bar.baz.quux = 4} -- Mix top-level and nested updates; 42, 4


=====================================
testsuite/tests/parser/should_run/RecordDotSyntax.stdout
=====================================
@@ -0,0 +1,36 @@
+-- selectors:
+Bar {bar = Baz {baz = Quux {quux = 42}}}
+Baz {baz = Quux {quux = 42}}
+Quux {quux = 42}
+42
+12
+12
+-- selections:
+42
+Quux {quux = 42}
+Baz {baz = Quux {quux = 42}}
+Bar {bar = Baz {baz = Quux {quux = 42}}}
+"hello"
+"hello"
+42
+42
+43
+43
+43
+-- updates:
+Quux {quux = 2}
+Bar {bar = Baz {baz = Quux {quux = 1}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 44}}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 45}}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 46}}}}
+Grault {f = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 3}}}}, g = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 4}}}}}
+-- punned updates:
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 102}}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 102}}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 102}}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 102}}}}
+Foo {foo = Bar {bar = Baz {baz = Quux {quux = 42}}}}
+Grault {f = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 102}}}}, g = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 4}}}}}
+Grault {f = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 42}}}}, g = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 1}}}}}
+Grault {f = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 42}}}}, g = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 42}}}}}
+Grault {f = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 42}}}}, g = Foo {foo = Bar {bar = Baz {baz = Quux {quux = 4}}}}}


=====================================
testsuite/tests/parser/should_run/all.T
=====================================
@@ -19,3 +19,4 @@ test('CountParserDeps',
      compile_and_run,
      ['-package ghc'])
 test('LexNegLit', normal, compile_and_run, [''])
+test('RecordDotSyntax', normal, compile_and_run, [''])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bcde79d54d20b95c4f16b05355e1f8c81359ee9e

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bcde79d54d20b95c4f16b05355e1f8c81359ee9e
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20200919/48f16671/attachment-0001.html>


More information about the ghc-commits mailing list