mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
[test] Fix validation tests
This commit is contained in:
@@ -14,32 +14,6 @@ import StdlibUnittest
|
||||
// constants. This is to check runtime behavior and ensure the constant is
|
||||
// not folded.
|
||||
|
||||
func expectOverflow<T>(
|
||||
_ res: (T, overflow: Bool),
|
||||
//===--- TRACE boilerplate ----------------------------------------------===//
|
||||
_ message: @autoclosure () -> String = "",
|
||||
showFrame: Bool = true,
|
||||
stackTrace: SourceLocStack = SourceLocStack(),
|
||||
file: String = #file, line: UInt = #line
|
||||
) {
|
||||
expectTrue(
|
||||
res.overflow, "expected overflow",
|
||||
stackTrace: stackTrace.pushIf(showFrame, file: file, line: line))
|
||||
}
|
||||
|
||||
func expectNoOverflow<T>(
|
||||
_ res: (T, overflow: Bool),
|
||||
//===--- TRACE boilerplate ----------------------------------------------===//
|
||||
_ message: @autoclosure () -> String = "",
|
||||
showFrame: Bool = true,
|
||||
stackTrace: SourceLocStack = SourceLocStack(),
|
||||
file: String = #file, line: UInt = #line
|
||||
) {
|
||||
expectFalse(
|
||||
res.overflow, "expected no overflow",
|
||||
stackTrace: stackTrace.pushIf(showFrame, file: file, line: line))
|
||||
}
|
||||
|
||||
func expectOverflow<T>(
|
||||
_ res: (partialValue: T, overflow: Bool),
|
||||
//===--- TRACE boilerplate ----------------------------------------------===//
|
||||
|
||||
Reference in New Issue
Block a user