Skip to content

Commit

Permalink
Test partial function within apply
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Sep 28, 2024
1 parent 3e152ae commit 26f1487
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9662,3 +9662,17 @@ object a {
}
}
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
>>>
rdd.map({ case (id, count) =>
(count, id)
})
<<< #4133 partial function within apply, long
maxColumn = 80
===
rdd.map(
{case (id, count) => (count, id)})
>>>
rdd.map({ case (id, count) => (count, id) })
14 changes: 14 additions & 0 deletions scalafmt-tests/shared/src/test/resources/newlines/source_fold.stat
Original file line number Diff line number Diff line change
Expand Up @@ -9062,3 +9062,17 @@ object a {
}
}
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
>>>
rdd.map({ case (id, count) =>
(count, id)
})
<<< #4133 partial function within apply, long
maxColumn = 80
===
rdd.map(
{case (id, count) => (count, id)})
>>>
rdd.map({ case (id, count) => (count, id) })
23 changes: 23 additions & 0 deletions scalafmt-tests/shared/src/test/resources/newlines/source_keep.stat
Original file line number Diff line number Diff line change
Expand Up @@ -9459,3 +9459,26 @@ object a {
}
}
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
>>>
Idempotency violated
=> Diff (- obtained, + expected)
rdd.map({ case (id, count) =>
- (count, id)
-})
+ (count, id)
+ }
+)
<<< #4133 partial function within apply, long
maxColumn = 80
===
rdd.map(
{case (id, count) => (count, id)})
>>>
Idempotency violated
=> Diff (- obtained, + expected)
-rdd.map({ case (id, count) => (count, id) })
+rdd.map({ case (id, count) => (count, id) }
+)
Original file line number Diff line number Diff line change
Expand Up @@ -9739,3 +9739,19 @@ object a {
}
}
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
>>>
rdd.map({ case (id, count) =>
(count, id)
})
<<< #4133 partial function within apply, long
maxColumn = 80
===
rdd.map(
{case (id, count) => (count, id)})
>>>
rdd.map({ case (id, count) =>
(count, id)
})

0 comments on commit 26f1487

Please sign in to comment.