mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
17 lines
468 B
Swift
17 lines
468 B
Swift
// RUN: %target-run-simple-swift | FileCheck %s
|
|
// REQUIRES: executable_test
|
|
|
|
// REQUIRES: objc_interop
|
|
|
|
import Foundation
|
|
|
|
let opts: NSBinarySearchingOptions = [.firstEqual, .insertionIndex]
|
|
|
|
// CHECK: true
|
|
print(opts.intersect([.lastEqual, .insertionIndex]) == .insertionIndex)
|
|
// CHECK: false
|
|
print(!opts.intersect(.lastEqual).isEmpty)
|
|
|
|
// CHECK: {{^}}0 0{{$}}
|
|
print("\(([] as NSBinarySearchingOptions).rawValue) \(NSBinarySearchingOptions(rawValue: 0).rawValue)")
|