Make internal stdlib functions public, which are called from the stdlib tests.

And make sure that all those public identifiers are preceeded with underscores.

I marked these public-modifiers with "// @testable" to document why they are public.
If some day we have a @testable attribute it should be used instead of those public-modifiers.

Again, this is needed for enabling dead internal function elimination in the stdlib.



Swift SVN r22657
This commit is contained in:
Erik Eckstein
2014-10-10 09:45:10 +00:00
parent 3d8008117f
commit d0697f2ac1
19 changed files with 88 additions and 41 deletions

View File

@@ -27,16 +27,16 @@ UnicodeInternals.test("copy") {
(u8)->() in
let p8 = u8.baseAddress
UTF16.copy(p8, destination: p16, count: 3)
UTF16._copy(p8, destination: p16, count: 3)
expectEqual([ 0, 1, 2, 9, 10, 11 ], Array(u16))
UTF16.copy(p16 + 3, destination: p8, count: 3)
UTF16._copy(p16 + 3, destination: p8, count: 3)
expectEqual([ 9, 10, 11, 3, 4, 5 ], Array(u8))
UTF16.copy(p16, destination: p16 + 3, count: 3)
UTF16._copy(p16, destination: p16 + 3, count: 3)
expectEqual([ 0, 1, 2, 0, 1, 2 ], Array(u16))
UTF16.copy(p8, destination: p8 + 3, count: 3)
UTF16._copy(p8, destination: p8 + 3, count: 3)
expectEqual([ 9, 10, 11, 9, 10, 11 ], Array(u8))
}
}