Skip to content

Commit 0917c01

Browse files
committed
update validation tests for Boolean removal.
1 parent aba4bd5 commit 0917c01

File tree

2 files changed

+6
-22
lines changed

2 files changed

+6
-22
lines changed

validation-test/compiler_crashers_fixed/00017-llvm-foldingset-llvm-attributesetnode-nodeequals.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
// See http://swift.org/LICENSE.txt for license information
77
// See http://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
88

9-
// RUN: %target-swift-frontend %s -parse -verify
9+
// RUN: not %target-swift-frontend %s -parse -verify
1010

1111
// Issue found by https://github.com/jvasileff (John Vasileff)
1212
// This bug is NOT triggered when compiling with -O.

validation-test/stdlib/FixedPoint.swift.gyb

Lines changed: 5 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -266,15 +266,15 @@ _UnimplementedError()
266266
//===----------------------------------------------------------------------===//
267267

268268
func testBitwiseOperationsImpl<T : UnsignedInteger>(_: T.Type) {
269-
var x = numericCast(0b11_1010_00) as T
270-
var y = numericCast(0b10_1100_10) as T
269+
let x = numericCast(0b11_1010_00) as T
270+
let y = numericCast(0b10_1100_10) as T
271271

272272
expectEqual(0b10_1000_00, x & y)
273273
expectEqual(0b11_1110_10, x | y)
274274
expectEqual(0b01_0110_10, x ^ y)
275275
expectEqual(0b00_0101_11, (~x) & 0xff)
276276

277-
var z = T.allZeros
277+
let z = T.allZeros
278278
expectEqual(x, x | z)
279279
expectEqual(x, x ^ z)
280280
expectEqual(z, x & z)
@@ -344,30 +344,14 @@ BoolTestSuite.test("init()") {
344344
expectFalse(v)
345345
}
346346

347-
struct Booleanish : Boolean {
348-
let boolValue: Bool
349-
}
350-
351-
BoolTestSuite.test("init<T : Boolean>(_:)") {
352-
do {
353-
let v = Bool(Booleanish(boolValue: false))
354-
expectFalse(v)
355-
}
356-
do {
357-
let v = Bool(Booleanish(boolValue: true))
358-
expectTrue(v)
359-
}
360-
}
361-
362347
BoolTestSuite.test("Boolean") {
363348
do {
364349
var v: Bool = false
365-
expectIsBooleanType(&v)
366-
expectFalse(v.boolValue)
350+
expectFalse(v)
367351
}
368352
do {
369353
var v: Bool = true
370-
expectTrue(v.boolValue)
354+
expectTrue(v)
371355
}
372356
}
373357

0 commit comments

Comments
 (0)