mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
[validation-test] Extracting array and slice types conformance tests
Since these tests take the most time, spliting them into 'one type - one conformance' pairs to maximize parallelism. <rdar://problem/30269532>
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
// Automatically Generated From validation-test/stdlib/Array/Inputs/ArrayConformanceTests.swift.gyb
|
||||
// Do Not Edit Directly!
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
// RUN: %target-run-simple-swift
|
||||
// REQUIRES: executable_test
|
||||
|
||||
import StdlibUnittest
|
||||
import StdlibCollectionUnittest
|
||||
|
||||
|
||||
let tests = TestSuite("ContiguousArray_MutableRandomAccessCollectionRef")
|
||||
|
||||
|
||||
|
||||
do {
|
||||
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
|
||||
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .none
|
||||
|
||||
|
||||
// Test MutableCollectionType conformance with reference type elements.
|
||||
tests.addMutableRandomAccessCollectionTests(
|
||||
"ContiguousArray.",
|
||||
makeCollection: { (elements: [LifetimeTracked]) in
|
||||
return ContiguousArray(elements)
|
||||
},
|
||||
wrapValue: { (element: OpaqueValue<Int>) in
|
||||
LifetimeTracked(element.value, identity: element.identity)
|
||||
},
|
||||
extractValue: { (element: LifetimeTracked) in
|
||||
OpaqueValue(element.value, identity: element.identity)
|
||||
},
|
||||
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
|
||||
// FIXME: use LifetimeTracked.
|
||||
return ContiguousArray(elements)
|
||||
},
|
||||
wrapValueIntoEquatable: identityEq,
|
||||
extractValueFromEquatable: identityEq,
|
||||
makeCollectionOfComparable: { (elements: [MinimalComparableValue]) in
|
||||
// FIXME: use LifetimeTracked.
|
||||
return ContiguousArray(elements)
|
||||
},
|
||||
wrapValueIntoComparable: identityComp,
|
||||
extractValueFromComparable: identityComp,
|
||||
resiliencyChecks: resiliencyChecks,
|
||||
withUnsafeMutableBufferPointerIsSupported: true,
|
||||
isFixedLengthCollection: false)
|
||||
|
||||
|
||||
} // do
|
||||
|
||||
runAllTests()
|
||||
|
||||
Reference in New Issue
Block a user