Guillaume Lessard
882466a730
apply missing availability attributes to Mach.Port
2023-10-13 18:55:23 -07:00
Guillaume Lessard
fb0efe832c
[gardening] finish cleaning up old test files
...
This should have been removed alongside XCTestManifests.swift
2023-10-12 15:02:31 -07:00
Guillaume Lessard
8a8552f617
Merge pull request #129 from glessard/reenable-mach-port
...
Re-enable Mach.Port
2023-08-16 16:04:53 -07:00
Guillaume Lessard
ad407249fe
make test expression return Void
...
- It can’t return `Mach.Port<SendRight>`, because a noncopyable type cannot currently be a generic type argument.
2023-08-16 13:34:41 -07:00
Guillaume Lessard and loffgren
faffb9a15a
Apply suggestions from code review
...
This better communicates the intention.
Co-authored-by: loffgren <117697138+loffgren@users.noreply.github.com >
2023-08-16 13:19:52 -07:00
Guillaume Lessard
f32faad415
remove code depending on Swift older than 5.6
2023-08-16 11:02:51 -07:00
Guillaume Lessard
f5edd720bd
clarify some tests
2023-08-11 18:03:24 -07:00
Guillaume Lessard
6189c1f553
fix copySendRight() for send rights that become dead names
2023-08-11 14:09:44 -07:00
Guillaume Lessard
e4d06ae3ea
simplify deinit
2023-08-10 15:35:27 -07:00
Guillaume Lessard
d259ef476e
test two-parameter withBorrowedName
2023-08-10 15:35:27 -07:00
Guillaume Lessard
5e03246e4e
test copies of dead mach port names
2023-08-10 15:32:19 -07:00
Guillaume Lessard
40b5b3068b
test all the relinquish() methods
2023-08-10 15:32:19 -07:00
Guillaume Lessard
e8bb779909
use inout conversion
...
- this is the situation where it is appropriate
2023-08-10 15:32:19 -07:00
Guillaume Lessard
6ee96ffdb5
modify consuming methods to call discard self
2023-08-09 15:58:56 -07:00
Guillaume Lessard
0539daa364
fix test of receive-right deallocation
2023-08-09 15:58:56 -07:00
Guillaume Lessard
669dcf2c25
ensure Mach.Port lives until the function returns
2023-08-09 15:58:56 -07:00
Guillaume Lessard
bf16d3da30
[test] use XCTAssertEqual or XCTAssertNotEqual
2023-08-09 15:58:56 -07:00
Guillaume Lessard
af4544c869
Re-enable Mach.Port
2023-08-09 15:58:56 -07:00
Saleem Abdulrasool
e1ab868059
Tests: avoid unnecessary duplication (NFCI)
...
Rather than specialising the function with the same implementation,
prefer to use the `CInterop.PlatformUnicodeEncoding` to determine the
correct code point encoding. This allows us to share the implementation
across the platforms.
2023-07-13 10:00:45 -07:00
Saleem Abdulrasool
32026456ba
Tests: adjust the FilePathTest.testFilePath to build on Windows
...
UTF-8 is not the universal encoding for file systems. Use a platform
specific invalid string encoding for testing the sequence. The internal
representation of a `FilePath` is dependent on the system, and Windows
uses UTF-16 as the base encoding for C interoperability. Adjust the
test to use an invalid sequence in the proper encoding. This allows the
tests to now build on Windows once again.
2023-07-13 08:42:12 -07:00
Guillaume Lessard
7bcc01f0bf
deactivate Mach.Port
...
Will reactivate when the following issue is fixed:
https://github.com/apple/swift/issues/66299 (rdar://110496872)
2023-06-09 16:46:48 -07:00
Guillaume Lessard
2d6c6a82b3
import module correctly in test file
2023-06-09 16:40:32 -07:00
Daniel Loffgren
5b1b4cab56
Remove allocatePortRightPair(), as move only types are not permitted in tuples
2023-06-09 16:40:32 -07:00
Karoy Lorentey
bb6ab43e44
Update availability declarations
2023-03-01 18:10:40 -08:00
Karoy Lorentey
cc96d40bee
Merge pull request #76 from apple/lorentey/post-back-ios15-system
...
Update package with changes from recent ABI stable releases
2023-02-28 16:13:44 -08:00
Alex Martini
2c2a831f66
Remove blank lines at the end of doc comments.
2023-01-31 12:35:33 -08:00
Max Desiatov
b5e330163a
MachPortTests: fix build issues with Swift 5.7
2023-01-05 14:35:22 +00:00
Daniel Loffgren
47feb93a38
Add a test that ensures makeSendOnce is creating unique send-once rights
2022-12-21 13:43:26 -08:00
Daniel Loffgren
304ccc3abb
Add Mach.Port
2022-12-07 17:24:26 -08:00
Saleem Abdulrasool
348b4de820
Merge pull request #99 from compnerd/file-flags
...
Tests: remove some flags from file tests
2022-06-18 09:44:43 -07:00
Saleem Abdulrasool
e378fb2f0d
Tests: ignore XCTest manifest on newer Swift ( #91 )
...
This is motivated by the desire to build the test suite on Windows.
Newer versions of SPM have test discovery which obviates the test
manifest, which incidentally repairs the build on Windows while adopting
newer functionality and reducing management complexity.
2022-06-15 10:00:23 -06:00
Karoy Lorentey
e9886bf251
Merge branch 'main' into lorentey/post-back-ios15-system
...
# Conflicts:
# Sources/System/FilePath/FilePathString.swift
2022-06-13 16:45:25 -07:00
Karoy Lorentey
63cdebeff6
Merge pull request #95 from compnerd/chartype
...
Tests: explicitly convert the character type
2022-06-13 16:32:28 -07:00
Karoy Lorentey
97a03f97c8
Merge pull request #103 from compnerd/array
...
Tests: change the conversion for string to array
2022-06-13 16:30:40 -07:00
Karoy Lorentey
0a7e8e121b
Merge pull request #100 from compnerd/utf16
...
Tests: explicitly convert to UTF16 on Windows
2022-06-13 16:14:41 -07:00
Karoy Lorentey
a102156af3
Merge pull request #96 from compnerd/not-errno
...
Tests: remove error codes that are unavailable on windows
2022-06-13 14:59:59 -07:00
Karoy Lorentey
dc5a3107c0
Merge pull request #102 from compnerd/underlying
...
Tests: adjust the Windows error codes
2022-06-13 14:55:14 -07:00
Saleem Abdulrasool
a5c43b17a9
Tests: adjust invalid character
...
Adjust the injected character to be an invalid UTF-16 and UTF-8
character. This is required to make the tests pass on Windows.
2022-06-12 14:34:12 -07:00
Saleem Abdulrasool
429f64259f
Tests: adjust the Windows error codes
...
The Windows error codes are not re-exported, explicitly import the
WinSDK module to gain access to the error codes. Add Windows specific
checks to ensure that the named forms match the underlying
implementation.
2022-06-12 12:35:54 -07:00
Saleem Abdulrasool
18c5f7a54b
Tests: change the conversion for string to array
...
Windows uses UTF16 for the platform character, not UTF8, and does not
map to CChar. Add a Windows path for the conversion.
2022-06-12 11:59:43 -07:00
Saleem Abdulrasool
f9a514897e
Tests: explicitly convert to UTF16 on Windows
...
File paths on Windows are represented in UTF16, while Swift strings are
UTF8. Explicitly convert from UTF16 on Windows.
2022-06-12 11:37:47 -07:00
Saleem Abdulrasool
8e247d927e
Tests: remove some flags from file tests
...
Windows does not support some flags (e.g. `O_CLOEXEC`). This removes
the unsupported options on Windows.
2022-06-12 11:33:45 -07:00
Saleem Abdulrasool
59ddf00c8e
Tests: remove error codes that are unavailable on windows
...
Not all the error codes are available on Windows, this matches
SystemErrno cases to remove the cases that have no definition on
Windows.
2022-06-12 11:21:16 -07:00
Saleem Abdulrasool
6d8abddbc8
Tests: explicitly convert the character type
...
The platform character type is different across Unix and Windows.
Explicitly convert the value to the expected type.
2022-06-11 14:50:35 -07:00
Guillaume Lessard
469ede0fa2
Add tests for every new overload added
2022-06-03 16:43:25 -06:00
Guillaume Lessard
914c782b96
Replace assumingMemoryBound with temporary rebinding
...
- this doesn’t use the new memory binding API.
2022-05-27 18:09:45 -06:00
Karoy Lorentey
bd5a7bb703
Remove test of minimal value
2022-05-21 12:44:00 -07:00
Karoy Lorentey
147ebc053a
Unbreak the Windows port
2022-05-21 12:43:59 -07:00
Si Beaumont
7bb5279b57
fixup: Tests run in parallel; use unique temp file name
...
Signed-off-by: Si Beaumont <beaumont@apple.com >
2022-05-20 19:25:41 +01:00
Si Beaumont
d90bf8529a
fixup: Move FileDescriptor.fileSize() to an internal extension in SystemTests
2022-05-06 11:55:00 +01:00