Skip to content

Commit e2c22b2

Browse files
author
Max Moiseev
committed
[tests] Re-generate files from the template
1 parent 7730c60 commit e2c22b2

File tree

48 files changed

+1212
-780
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1212
-780
lines changed

validation-test/stdlib/Collection/DefaultedBidirectionalCollection.swift

+1-24
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,6 @@ do {
3333
)
3434
}
3535

36-
// Test collections using a reference type as element.
37-
do {
38-
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
39-
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
36+
runAllTests()
4037

41-
CollectionTests.addBidirectionalCollectionTests(
42-
makeCollection: { (elements: [LifetimeTracked]) in
43-
return DefaultedBidirectionalCollection(elements: elements)
44-
},
45-
wrapValue: { (element: OpaqueValue<Int>) in
46-
LifetimeTracked(element.value, identity: element.identity)
47-
},
48-
extractValue: { (element: LifetimeTracked) in
49-
OpaqueValue(element.value, identity: element.identity)
50-
},
51-
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
52-
// FIXME: use LifetimeTracked.
53-
return DefaultedBidirectionalCollection(elements: elements)
54-
},
55-
wrapValueIntoEquatable: identityEq,
56-
extractValueFromEquatable: identityEq,
57-
resiliencyChecks: resiliencyChecks
58-
)
59-
}
6038

61-
runAllTests()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// -*- swift -*-
2+
3+
//===----------------------------------------------------------------------===//
4+
// Automatically Generated From validation-test/stdlib/Collection/Inputs/Template.swift.gyb
5+
// Do Not Edit Directly!
6+
//===----------------------------------------------------------------------===//
7+
8+
// RUN: %target-run-simple-swift
9+
// REQUIRES: executable_test
10+
11+
import StdlibUnittest
12+
import StdlibCollectionUnittest
13+
14+
var CollectionTests = TestSuite("Collection")
15+
16+
// Test collections using a reference type as element.
17+
do {
18+
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
19+
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
20+
21+
CollectionTests.addBidirectionalCollectionTests(
22+
makeCollection: { (elements: [LifetimeTracked]) in
23+
return DefaultedBidirectionalCollection(elements: elements)
24+
},
25+
wrapValue: { (element: OpaqueValue<Int>) in
26+
LifetimeTracked(element.value, identity: element.identity)
27+
},
28+
extractValue: { (element: LifetimeTracked) in
29+
OpaqueValue(element.value, identity: element.identity)
30+
},
31+
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
32+
// FIXME: use LifetimeTracked.
33+
return DefaultedBidirectionalCollection(elements: elements)
34+
},
35+
wrapValueIntoEquatable: identityEq,
36+
extractValueFromEquatable: identityEq,
37+
resiliencyChecks: resiliencyChecks
38+
)
39+
}
40+
41+
runAllTests()

validation-test/stdlib/Collection/DefaultedCollection.swift

+1-24
Original file line numberDiff line numberDiff line change
@@ -33,29 +33,6 @@ do {
3333
)
3434
}
3535

36-
// Test collections using a reference type as element.
37-
do {
38-
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
39-
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
36+
runAllTests()
4037

41-
CollectionTests.addCollectionTests(
42-
makeCollection: { (elements: [LifetimeTracked]) in
43-
return DefaultedCollection(elements: elements)
44-
},
45-
wrapValue: { (element: OpaqueValue<Int>) in
46-
LifetimeTracked(element.value, identity: element.identity)
47-
},
48-
extractValue: { (element: LifetimeTracked) in
49-
OpaqueValue(element.value, identity: element.identity)
50-
},
51-
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
52-
// FIXME: use LifetimeTracked.
53-
return DefaultedCollection(elements: elements)
54-
},
55-
wrapValueIntoEquatable: identityEq,
56-
extractValueFromEquatable: identityEq,
57-
resiliencyChecks: resiliencyChecks
58-
)
59-
}
6038

61-
runAllTests()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
// -*- swift -*-
2+
3+
//===----------------------------------------------------------------------===//
4+
// Automatically Generated From validation-test/stdlib/Collection/Inputs/Template.swift.gyb
5+
// Do Not Edit Directly!
6+
//===----------------------------------------------------------------------===//
7+
8+
// RUN: %target-run-simple-swift
9+
// REQUIRES: executable_test
10+
11+
import StdlibUnittest
12+
import StdlibCollectionUnittest
13+
14+
var CollectionTests = TestSuite("Collection")
15+
16+
// Test collections using a reference type as element.
17+
do {
18+
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
19+
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
20+
21+
CollectionTests.addCollectionTests(
22+
makeCollection: { (elements: [LifetimeTracked]) in
23+
return DefaultedCollection(elements: elements)
24+
},
25+
wrapValue: { (element: OpaqueValue<Int>) in
26+
LifetimeTracked(element.value, identity: element.identity)
27+
},
28+
extractValue: { (element: LifetimeTracked) in
29+
OpaqueValue(element.value, identity: element.identity)
30+
},
31+
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
32+
// FIXME: use LifetimeTracked.
33+
return DefaultedCollection(elements: elements)
34+
},
35+
wrapValueIntoEquatable: identityEq,
36+
extractValueFromEquatable: identityEq,
37+
resiliencyChecks: resiliencyChecks
38+
)
39+
}
40+
41+
runAllTests()

validation-test/stdlib/Collection/DefaultedMutableBidirectionalCollection.swift

+1-32
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,6 @@ do {
4040
)
4141
}
4242

43-
// Test collections using a reference type as element.
44-
do {
45-
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
46-
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
43+
runAllTests()
4744

48-
CollectionTests.addMutableBidirectionalCollectionTests(
49-
makeCollection: { (elements: [LifetimeTracked]) in
50-
return DefaultedMutableBidirectionalCollection(elements: elements)
51-
},
52-
wrapValue: { (element: OpaqueValue<Int>) in
53-
LifetimeTracked(element.value, identity: element.identity)
54-
},
55-
extractValue: { (element: LifetimeTracked) in
56-
OpaqueValue(element.value, identity: element.identity)
57-
},
58-
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
59-
// FIXME: use LifetimeTracked.
60-
return DefaultedMutableBidirectionalCollection(elements: elements)
61-
},
62-
wrapValueIntoEquatable: identityEq,
63-
extractValueFromEquatable: identityEq,
64-
makeCollectionOfComparable: { (elements: [MinimalComparableValue]) in
65-
// FIXME: use LifetimeTracked.
66-
return DefaultedMutableBidirectionalCollection(elements: elements)
67-
},
68-
wrapValueIntoComparable: identityComp,
69-
extractValueFromComparable: identityComp,
70-
resiliencyChecks: resiliencyChecks
71-
, withUnsafeMutableBufferPointerIsSupported: false,
72-
isFixedLengthCollection: true
73-
)
74-
}
7545

76-
runAllTests()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// -*- swift -*-
2+
3+
//===----------------------------------------------------------------------===//
4+
// Automatically Generated From validation-test/stdlib/Collection/Inputs/Template.swift.gyb
5+
// Do Not Edit Directly!
6+
//===----------------------------------------------------------------------===//
7+
8+
// RUN: %target-run-simple-swift
9+
// REQUIRES: executable_test
10+
11+
import StdlibUnittest
12+
import StdlibCollectionUnittest
13+
14+
var CollectionTests = TestSuite("Collection")
15+
16+
// Test collections using a reference type as element.
17+
do {
18+
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
19+
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
20+
21+
CollectionTests.addMutableBidirectionalCollectionTests(
22+
makeCollection: { (elements: [LifetimeTracked]) in
23+
return DefaultedMutableBidirectionalCollection(elements: elements)
24+
},
25+
wrapValue: { (element: OpaqueValue<Int>) in
26+
LifetimeTracked(element.value, identity: element.identity)
27+
},
28+
extractValue: { (element: LifetimeTracked) in
29+
OpaqueValue(element.value, identity: element.identity)
30+
},
31+
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
32+
// FIXME: use LifetimeTracked.
33+
return DefaultedMutableBidirectionalCollection(elements: elements)
34+
},
35+
wrapValueIntoEquatable: identityEq,
36+
extractValueFromEquatable: identityEq,
37+
makeCollectionOfComparable: { (elements: [MinimalComparableValue]) in
38+
// FIXME: use LifetimeTracked.
39+
return DefaultedMutableBidirectionalCollection(elements: elements)
40+
},
41+
wrapValueIntoComparable: identityComp,
42+
extractValueFromComparable: identityComp,
43+
resiliencyChecks: resiliencyChecks
44+
, withUnsafeMutableBufferPointerIsSupported: false,
45+
isFixedLengthCollection: true
46+
)
47+
}
48+
49+
runAllTests()

validation-test/stdlib/Collection/DefaultedMutableCollection.swift

+1-32
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,6 @@ do {
4040
)
4141
}
4242

43-
// Test collections using a reference type as element.
44-
do {
45-
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
46-
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
43+
runAllTests()
4744

48-
CollectionTests.addMutableCollectionTests(
49-
makeCollection: { (elements: [LifetimeTracked]) in
50-
return DefaultedMutableCollection(elements: elements)
51-
},
52-
wrapValue: { (element: OpaqueValue<Int>) in
53-
LifetimeTracked(element.value, identity: element.identity)
54-
},
55-
extractValue: { (element: LifetimeTracked) in
56-
OpaqueValue(element.value, identity: element.identity)
57-
},
58-
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
59-
// FIXME: use LifetimeTracked.
60-
return DefaultedMutableCollection(elements: elements)
61-
},
62-
wrapValueIntoEquatable: identityEq,
63-
extractValueFromEquatable: identityEq,
64-
makeCollectionOfComparable: { (elements: [MinimalComparableValue]) in
65-
// FIXME: use LifetimeTracked.
66-
return DefaultedMutableCollection(elements: elements)
67-
},
68-
wrapValueIntoComparable: identityComp,
69-
extractValueFromComparable: identityComp,
70-
resiliencyChecks: resiliencyChecks
71-
, withUnsafeMutableBufferPointerIsSupported: false,
72-
isFixedLengthCollection: true
73-
)
74-
}
7545

76-
runAllTests()
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
// -*- swift -*-
2+
3+
//===----------------------------------------------------------------------===//
4+
// Automatically Generated From validation-test/stdlib/Collection/Inputs/Template.swift.gyb
5+
// Do Not Edit Directly!
6+
//===----------------------------------------------------------------------===//
7+
8+
// RUN: %target-run-simple-swift
9+
// REQUIRES: executable_test
10+
11+
import StdlibUnittest
12+
import StdlibCollectionUnittest
13+
14+
var CollectionTests = TestSuite("Collection")
15+
16+
// Test collections using a reference type as element.
17+
do {
18+
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
19+
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
20+
21+
CollectionTests.addMutableCollectionTests(
22+
makeCollection: { (elements: [LifetimeTracked]) in
23+
return DefaultedMutableCollection(elements: elements)
24+
},
25+
wrapValue: { (element: OpaqueValue<Int>) in
26+
LifetimeTracked(element.value, identity: element.identity)
27+
},
28+
extractValue: { (element: LifetimeTracked) in
29+
OpaqueValue(element.value, identity: element.identity)
30+
},
31+
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
32+
// FIXME: use LifetimeTracked.
33+
return DefaultedMutableCollection(elements: elements)
34+
},
35+
wrapValueIntoEquatable: identityEq,
36+
extractValueFromEquatable: identityEq,
37+
makeCollectionOfComparable: { (elements: [MinimalComparableValue]) in
38+
// FIXME: use LifetimeTracked.
39+
return DefaultedMutableCollection(elements: elements)
40+
},
41+
wrapValueIntoComparable: identityComp,
42+
extractValueFromComparable: identityComp,
43+
resiliencyChecks: resiliencyChecks
44+
, withUnsafeMutableBufferPointerIsSupported: false,
45+
isFixedLengthCollection: true
46+
)
47+
}
48+
49+
runAllTests()

validation-test/stdlib/Collection/DefaultedMutableRandomAccessCollection.swift

+1-32
Original file line numberDiff line numberDiff line change
@@ -40,37 +40,6 @@ do {
4040
)
4141
}
4242

43-
// Test collections using a reference type as element.
44-
do {
45-
var resiliencyChecks = CollectionMisuseResiliencyChecks.all
46-
resiliencyChecks.creatingOutOfBoundsIndicesBehavior = .trap
43+
runAllTests()
4744

48-
CollectionTests.addMutableRandomAccessCollectionTests(
49-
makeCollection: { (elements: [LifetimeTracked]) in
50-
return DefaultedMutableRandomAccessCollection(elements: elements)
51-
},
52-
wrapValue: { (element: OpaqueValue<Int>) in
53-
LifetimeTracked(element.value, identity: element.identity)
54-
},
55-
extractValue: { (element: LifetimeTracked) in
56-
OpaqueValue(element.value, identity: element.identity)
57-
},
58-
makeCollectionOfEquatable: { (elements: [MinimalEquatableValue]) in
59-
// FIXME: use LifetimeTracked.
60-
return DefaultedMutableRandomAccessCollection(elements: elements)
61-
},
62-
wrapValueIntoEquatable: identityEq,
63-
extractValueFromEquatable: identityEq,
64-
makeCollectionOfComparable: { (elements: [MinimalComparableValue]) in
65-
// FIXME: use LifetimeTracked.
66-
return DefaultedMutableRandomAccessCollection(elements: elements)
67-
},
68-
wrapValueIntoComparable: identityComp,
69-
extractValueFromComparable: identityComp,
70-
resiliencyChecks: resiliencyChecks
71-
, withUnsafeMutableBufferPointerIsSupported: false,
72-
isFixedLengthCollection: true
73-
)
74-
}
7545

76-
runAllTests()

0 commit comments

Comments
 (0)