Skip to content

Commit d9561d9

Browse files
authored
Merge pull request #17769 from lorentey/shorten-anyhashable-tests-4.2
[4.2][test] AnyHashable: Shorten class hierarchy tests
2 parents 4652e6a + e64884d commit d9561d9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

validation-test/stdlib/AnyHashable.swift.gyb

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -510,14 +510,15 @@ class ${Self.full_name} : ${Super.full_name} {}
510510

511511
AnyHashableTests.test("AnyHashable containing classes from the ${prefix} hierarchy") {
512512
typealias T = Int
513+
% bunch = 2
513514
let xs = [
514515
% for (i, (Self, _)) in enumerate(types):
515516
% ConcreteSelf = Self
516517
% if ConcreteSelf.is_generic:
517518
% ConcreteSelf = ConcreteSelf.specialize_with({'T':'Int'})
518519
% end
519-
${Self.full_name}(${len(types) + i}),
520-
% for j in range(0, len(types)):
520+
${Self.full_name}(${bunch + i}),
521+
% for j in range(0, bunch):
521522
${Self.full_name}(${j}),
522523
% end
523524
% end
@@ -526,7 +527,7 @@ AnyHashableTests.test("AnyHashable containing classes from the ${prefix} hierarc
526527
if lhs == rhs {
527528
return true
528529
}
529-
let p = ${len(types) + 1}
530+
let p = ${bunch + 1}
530531
if lhs % p == 0 || rhs % p == 0 {
531532
return false
532533
}

0 commit comments

Comments
 (0)