Repository navigation
Conversation
Adds crates/xcl/tests/gpu_adapter_desc.rs, an integration test that constructs DXGI_ADAPTER_DESC1 values directly (no GPU/device) and asserts that adapter::name() returns exactly the UTF-16 prefix of Description up to the first NUL, capped at the 128-code-unit array: trailing NUL padding, truncated-at-boundary without terminator (127 and 128 units), NUL in the middle, all-NUL/empty, non-BMP code units (e.g. Radeon ™), and a NUL-first array. Uses Default::default() as the baseline instead of cloning a real adapter. No production code changed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds crates/xcl/tests/gpu_adapter_desc.rs: an integration test pinning adapter::name() to return exactly the UTF-16 prefix of DXGI_ADAPTER_DESC1::Description up to the first NUL, capped at the 128-code-unit array. Constructs only default/NUL-padded descriptions (no device, no GPU); verifies trailing-NUL padding, 127/128-unit boundary truncation, NUL-in-middle, all-NUL/empty, NUL-first, and non-ASCII code units. No production code changed.
What is in it
Tested
AMD Radeon(TM) Graphics (driver 32.0.21043.19003, DXC 1.9.2609, native wave64),XCL_ADAPTER=radeon):cargo test --workspace -- --test-threads=2— 864 passed, 0 failed, 42 ignored (SKIPPED GPU tests: 1 (no heap windows))Not tested
AI use
Mirror of xcl-dev#1731 (auto-synced, do not edit).