Skip to content

Commit dd78e3b

Browse files
committed
[cxx-interop] Add a MutableCollection test that relies on std::string being Comparable
This is possible after #76223.
1 parent 8b1e257 commit dd78e3b

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)