Skip to content

Commit

Permalink
Test match with/without dot and trailing comment
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Nov 20, 2024
1 parent 0d14bdd commit 3ad7a7e
Show file tree
Hide file tree
Showing 5 changed files with 83 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7603,3 +7603,23 @@ object a {
.match
case _ =>
}
<<< match with dot, trailing case comment
object a:
b.c.match
case d if e => f
// comment
>>>
object a:
b.c.match
case d if e => f
// comment
<<< match without dot, trailing case comment
object a:
b.c match
case d if e => f
// comment
>>>
object a:
b.c match
case d if e => f
// comment
Original file line number Diff line number Diff line change
Expand Up @@ -7311,3 +7311,23 @@ object a {
(a.b(c)).match
case _ =>
}
<<< match with dot, trailing case comment
object a:
b.c.match
case d if e => f
// comment
>>>
object a:
b.c.match
case d if e => f
// comment
<<< match without dot, trailing case comment
object a:
b.c match
case d if e => f
// comment
>>>
object a:
b.c match
case d if e => f
// comment
Original file line number Diff line number Diff line change
Expand Up @@ -7630,3 +7630,23 @@ object a {
(a.b(c)).match
case _ =>
}
<<< match with dot, trailing case comment
object a:
b.c.match
case d if e => f
// comment
>>>
object a:
b.c.match
case d if e => f
// comment
<<< match without dot, trailing case comment
object a:
b.c match
case d if e => f
// comment
>>>
object a:
b.c match
case d if e => f
// comment
Original file line number Diff line number Diff line change
Expand Up @@ -7919,3 +7919,25 @@ object a {
(a.b(c)).match
case _ =>
}
<<< match with dot, trailing case comment
object a:
b.c.match
case d if e => f
// comment
>>>
Idempotency violated
=> Diff (- obtained, + expected)
f
- // comment
+ // comment
<<< match without dot, trailing case comment
object a:
b.c match
case d if e => f
// comment
>>>
object a:
b.c match
case d if e =>
f
// comment
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class FormatTests extends FunSuite with CanRunTests with FormatAssertions {
val explored = Debug.explored.get()
logger.debug(s"Total explored: $explored")
if (!onlyUnit && !onlyManual)
assertEquals(explored, 1083470, "total explored")
assertEquals(explored, 1083760, "total explored")
val results = debugResults.result()
// TODO(olafur) don't block printing out test results.
// I don't want to deal with scalaz's Tasks :'(
Expand Down

0 comments on commit 3ad7a7e

Please sign in to comment.