Skip to content

Commit a0fb54c

Browse files
authored
Merge pull request #76313 from swiftlang/egorzhdan/std-vector-string-comparable
[cxx-interop] Add a `MutableCollection` test that relies on `std::string` being `Comparable`
2 parents bf96347 + dd78e3b commit a0fb54c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

test/Interop/Cxx/stdlib/use-std-vector.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,11 @@ StdVectorTestSuite.test("VectorOfString as MutableCollection") {
9797
expectEqual(v[0], std.string("xyz"))
9898
expectEqual(v[1], std.string("abc"))
9999
expectEqual(v[2], std.string("ijk"))
100+
101+
v.sort() // Swift function
102+
expectEqual(v[0], std.string("abc"))
103+
expectEqual(v[1], std.string("ijk"))
104+
expectEqual(v[2], std.string("xyz"))
100105
}
101106
#endif
102107

0 commit comments

Comments
 (0)