Skip to content

Commit

Permalink
Test applies/selects with a partial function
Browse files Browse the repository at this point in the history
  • Loading branch information
kitbellew committed Sep 30, 2024
1 parent 3069e17 commit c971608
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9662,6 +9662,33 @@ object a {
}
}
}
<<< #4133 applies and selects with a partial function 1
maxColumn = 76
runner.parser = source
===
val fieldsCasts = from.fields.zip(to.fields).map {
case (fromField, toField) => nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
>>>
val fieldsCasts =
from.fields.zip(to.fields).map { case (fromField, toField) =>
nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
<<< #4133 applies and selects with a partial function 2
maxColumn = 76
===
val stats = Profiler.getStatistics().asScala.toSeq.map {
case (trace, count) => MethodCallTrace(trace.className, trace.methodName, trace.methodDescriptor) -> count.intValue
}
>>>
val stats =
Profiler.getStatistics().asScala.toSeq.map { case (trace, count) =>
MethodCallTrace(
trace.className,
trace.methodName,
trace.methodDescriptor
) -> count.intValue
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
Expand Down
26 changes: 26 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 @@ -9061,6 +9061,32 @@ object a {
}
}
}
<<< #4133 applies and selects with a partial function 1
maxColumn = 76
runner.parser = source
===
val fieldsCasts = from.fields.zip(to.fields).map {
case (fromField, toField) => nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
>>>
val fieldsCasts = from.fields.zip(to.fields)
.map { case (fromField, toField) =>
nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
<<< #4133 applies and selects with a partial function 2
maxColumn = 76
===
val stats = Profiler.getStatistics().asScala.toSeq.map {
case (trace, count) => MethodCallTrace(trace.className, trace.methodName, trace.methodDescriptor) -> count.intValue
}
>>>
val stats = Profiler.getStatistics().asScala.toSeq.map {
case (trace, count) => MethodCallTrace(
trace.className,
trace.methodName,
trace.methodDescriptor
) -> count.intValue
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
Expand Down
26 changes: 26 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,6 +9459,32 @@ object a {
}
}
}
<<< #4133 applies and selects with a partial function 1
maxColumn = 76
runner.parser = source
===
val fieldsCasts = from.fields.zip(to.fields).map {
case (fromField, toField) => nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
>>>
val fieldsCasts = from.fields.zip(to.fields).map {
case (fromField, toField) =>
nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
<<< #4133 applies and selects with a partial function 2
maxColumn = 76
===
val stats = Profiler.getStatistics().asScala.toSeq.map {
case (trace, count) => MethodCallTrace(trace.className, trace.methodName, trace.methodDescriptor) -> count.intValue
}
>>>
val stats = Profiler.getStatistics().asScala.toSeq.map {
case (trace, count) => MethodCallTrace(
trace.className,
trace.methodName,
trace.methodDescriptor
) -> count.intValue
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9739,6 +9739,38 @@ object a {
}
}
}
<<< #4133 applies and selects with a partial function 1
maxColumn = 76
runner.parser = source
===
val fieldsCasts = from.fields.zip(to.fields).map {
case (fromField, toField) => nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
>>>
val fieldsCasts = from
.fields
.zip(to.fields)
.map { case (fromField, toField) =>
nullSafeCastFunction(fromField.dataType, toField.dataType, ctx)
}
<<< #4133 applies and selects with a partial function 2
maxColumn = 76
===
val stats = Profiler.getStatistics().asScala.toSeq.map {
case (trace, count) => MethodCallTrace(trace.className, trace.methodName, trace.methodDescriptor) -> count.intValue
}
>>>
val stats = Profiler
.getStatistics()
.asScala
.toSeq
.map { case (trace, count) =>
MethodCallTrace(
trace.className,
trace.methodName,
trace.methodDescriptor
) -> count.intValue
}
<<< #4133 partial function within apply, short
rdd.map(
{case (id, count) => (count, id)})
Expand Down

0 comments on commit c971608

Please sign in to comment.