Skip to content

Commit 5da3e1d

Browse files
author
Max Moiseev
committed
[test] Fix validation tests
1 parent 1c3e597 commit 5da3e1d

File tree

2 files changed

+3
-29
lines changed

2 files changed

+3
-29
lines changed

validation-test/stdlib/FixedPoint.swift.gyb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,11 +327,11 @@ FixedPoint.test("BitwiseOperations/UInt64") {
327327
}
328328

329329
FixedPoint.test("OverflowCheck") {
330-
expectEqual((partialValue: 9, overflow: .none),
330+
expectEqual((partialValue: 9, overflow: false),
331331
(4 as Int8).addingReportingOverflow(5))
332-
expectEqual((partialValue: -128, overflow: .overflow),
332+
expectEqual((partialValue: -128, overflow: true),
333333
(1 as Int8).addingReportingOverflow(127))
334-
expectEqual((partialValue: 0, overflow: .overflow),
334+
expectEqual((partialValue: 0, overflow: true),
335335
(2 as UInt8).multipliedReportingOverflow(by: 128))
336336
}
337337

validation-test/stdlib/FixedPointArithmeticTraps.swift.gyb

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,6 @@ import StdlibUnittest
1414
// constants. This is to check runtime behavior and ensure the constant is
1515
// not folded.
1616

17-
func expectOverflow<T>(
18-
_ res: (T, overflow: Bool),
19-
//===--- TRACE boilerplate ----------------------------------------------===//
20-
_ message: @autoclosure () -> String = "",
21-
showFrame: Bool = true,
22-
stackTrace: SourceLocStack = SourceLocStack(),
23-
file: String = #file, line: UInt = #line
24-
) {
25-
expectTrue(
26-
res.overflow, "expected overflow",
27-
stackTrace: stackTrace.pushIf(showFrame, file: file, line: line))
28-
}
29-
30-
func expectNoOverflow<T>(
31-
_ res: (T, overflow: Bool),
32-
//===--- TRACE boilerplate ----------------------------------------------===//
33-
_ message: @autoclosure () -> String = "",
34-
showFrame: Bool = true,
35-
stackTrace: SourceLocStack = SourceLocStack(),
36-
file: String = #file, line: UInt = #line
37-
) {
38-
expectFalse(
39-
res.overflow, "expected no overflow",
40-
stackTrace: stackTrace.pushIf(showFrame, file: file, line: line))
41-
}
42-
4317
func expectOverflow<T>(
4418
_ res: (partialValue: T, overflow: Bool),
4519
//===--- TRACE boilerplate ----------------------------------------------===//

0 commit comments

Comments
 (0)