Skip to content

Commit 199ac15

Browse files
Fix potentially inconsiderate/inaccurate naming
1 parent 0e8a37b commit 199ac15

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

validation-test/stdlib/StringSlicesConcurrentAppend.swift

+6-6
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ extension String {
2626

2727
enum ThreadID {
2828
case Primary
29-
case Replica
29+
case Secondary
3030
}
3131

3232
var barrierVar: UnsafeMutablePointer<_stdlib_pthread_barrier_t> = nil
3333
var sharedString: String = ""
34-
var replicaString: String = ""
34+
var secondaryString: String = ""
3535

3636
func barrier() {
3737
var ret = _stdlib_pthread_barrier_wait(barrierVar)
@@ -74,14 +74,14 @@ func sliceConcurrentAppendThread(tid: ThreadID) {
7474
expectEqual("abc", sharedString)
7575

7676
// Verify that only one thread took ownership of the buffer.
77-
if tid == .Replica {
78-
replicaString = privateString
77+
if tid == .Secondary {
78+
secondaryString = privateString
7979
}
8080
barrier()
8181
if tid == .Primary {
8282
expectTrue(
8383
(privateString.bufferID == sharedString.bufferID) !=
84-
(replicaString.bufferID == sharedString.bufferID))
84+
(secondaryString.bufferID == sharedString.bufferID))
8585
}
8686
}
8787
}
@@ -95,7 +95,7 @@ StringTestSuite.test("SliceConcurrentAppend") {
9595
let (createRet1, tid1) = _stdlib_pthread_create_block(
9696
nil, sliceConcurrentAppendThread, .Primary)
9797
let (createRet2, tid2) = _stdlib_pthread_create_block(
98-
nil, sliceConcurrentAppendThread, .Replica)
98+
nil, sliceConcurrentAppendThread, .Secondary)
9999

100100
expectEqual(0, createRet1)
101101
expectEqual(0, createRet2)

0 commit comments

Comments
 (0)