Skip to content

Commit 2ef0a8f

Browse files
authored
Merge pull request #3991 from apple/stdlib-unittest-logging-wrappers
StdlibCollectionUnittest: reduce boilerplate
2 parents 4154d6b + 0118c73 commit 2ef0a8f

File tree

1 file changed

+3
-12
lines changed

1 file changed

+3
-12
lines changed

stdlib/private/StdlibCollectionUnittest/LoggingWrappers.swift.gyb

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212

1313
%{
1414
from gyb_stdlib_support import TRAVERSALS, collectionForTraversal
15+
from gyb_stdlib_unittest_support import TRACE, stackTrace, trace
1516
}%
1617

1718
import StdlibUnittest
@@ -666,12 +667,7 @@ public struct ${Self}<
666667
//===----------------------------------------------------------------------===//
667668

668669
public func expectCustomizable<T : Wrapper>(
669-
_: T, _ counters: TypeIndexed<Int>,
670-
//===--- TRACE boilerplate ----------------------------------------------===//
671-
_ message: @autoclosure () -> String = "",
672-
showFrame: Bool = true,
673-
stackTrace: SourceLocStack = SourceLocStack(),
674-
file: String = #file, line: UInt = #line
670+
_: T, _ counters: TypeIndexed<Int>, ${TRACE}
675671
) where
676672
T : LoggingType,
677673
T.Base : Wrapper, T.Base : LoggingType,
@@ -683,12 +679,7 @@ public func expectCustomizable<T : Wrapper>(
683679
}
684680

685681
public func expectNotCustomizable<T : Wrapper>(
686-
_: T, _ counters: TypeIndexed<Int>,
687-
//===--- TRACE boilerplate ----------------------------------------------===//
688-
_ message: @autoclosure () -> String = "",
689-
showFrame: Bool = true,
690-
stackTrace: SourceLocStack = SourceLocStack(),
691-
file: String = #file, line: UInt = #line
682+
_: T, _ counters: TypeIndexed<Int>, ${TRACE}
692683
) where
693684
T : LoggingType,
694685
T.Base : Wrapper, T.Base : LoggingType,

0 commit comments

Comments
 (0)