[Collections] Allow determining if internal checking is enabled

In the benchmark target, complain loudly if consistency checks
are enabled.
This commit is contained in:
Karoy Lorentey committed 2022-09-19 21:25:07 -07:00
1 parent 53895c6537
commit 12e3867ccb
6 files changed
+53 -4

No files matched your search

@@ -9,10 +9,14 @@
//
//===----------------------------------------------------------------------===//
import Swift
import _CollectionsUtilities
extension Heap {
#if COLLECTIONS_INTERNAL_CHECKS
public static var _isConsistencyCheckingEnabled: Bool {
_isCollectionsInternalCheckingEnabled
}
#if COLLECTIONS_INTERNAL_CHECKSx
/// Visits each item in the heap in depth-first order, verifying that the
/// contents satisfy the min-max heap property.
@inlinable