Skip to content

[SYCL] Testing follow-up to #23437. - #23641

Open
inteltdelisle wants to merge 1 commit into
intel:syclfrom
inteltdelisle:work/testing/spans
Open

inteltdelisle wants to merge 1 commit into
intel:syclfrom
inteltdelisle:work/testing/spans

Conversation

@inteltdelisle

Copy link
Copy Markdown
Contributor

sycl::span was updated in #23437 to match C++20 std::span but did not add much test coverage for the new behaviour. This extends sycl/test/basic_tests/span.cpp to cover:

  • Constructors and copy assignment
  • Deduction guides for every constructor kind
  • Observers: size(), size_bytes() and empty()
  • Element access: operator[], front(), back() and data()
  • Iterators: forward, reverse, range-for, and empty spans
  • first, last and subspan
  • as_bytes and as_writable_bytes
  • Type traits
  • Invalid constructions and conversions
  • Precondition failures that make constant evaluation fail

`sycl::span` was updated in intel#23437 to match C++20 `std::span` but did not add
much test coverage for the new behaviour. This extends
`sycl/test/basic_tests/span.cpp` to cover:
 - Constructors and copy assignment
 - Deduction guides for every constructor kind
 - Observers: size(), size_bytes() and empty()
 - Element access: operator[], front(), back() and data()
 - Iterators: forward, reverse, range-for, and empty spans
 - first, last and subspan
 - as_bytes and as_writable_bytes
 - Type traits
 - Invalid constructions and conversions
 - Precondition failures that make constant evaluation fail

Signed-off-by: Delisle, Thierry <thierry.delisle@intel.com>
@inteltdelisle
inteltdelisle requested a review from a team as a code owner October 27, 2026 14:24

@cperkinsintel cperkinsintel left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

awesome

@sys-ce-bb

Copy link
Copy Markdown
Contributor

@intel/llvm-gatekeepers please consider merging

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants