diff --git a/test/xpu_api/ranges/xpu_std_drop_view.pass.cpp b/test/xpu_api/ranges/xpu_std_drop_view.pass.cpp index 7057f4b3e5..1c41737298 100644 --- a/test/xpu_api/ranges/xpu_std_drop_view.pass.cpp +++ b/test/xpu_api/ranges/xpu_std_drop_view.pass.cpp @@ -28,7 +28,8 @@ main() #if _ENABLE_STD_RANGES_TESTING auto test = [](){ auto res = std::ranges::views::iota(0, 4) | std::ranges::views::drop(2); - return res.size() == 2 && res[0] == 2 && res[1] == 3 && *res.begin() == 2 && res.end() - res.begin() == 2; + return res.base()[1] == 1 && res.size() == 2 && res[0] == 2 && res[1] == 3 && *res.begin() == 2 + && res.end() - res.begin() == 2; }; const bool res = kernel_test(test); EXPECT_TRUE(res, "Wrong result of drop_view check within a kernel"); diff --git a/test/xpu_api/ranges/xpu_std_iota_view.pass.cpp b/test/xpu_api/ranges/xpu_std_iota_view.pass.cpp index d47b671bc2..50ab60f860 100644 --- a/test/xpu_api/ranges/xpu_std_iota_view.pass.cpp +++ b/test/xpu_api/ranges/xpu_std_iota_view.pass.cpp @@ -29,7 +29,8 @@ main() auto test = [](){ auto res = std::ranges::views::iota(0, 4); return res.size() == 4 && res[0] == 0 && res[1] == 1 && res[2] == 2 && res[3] == 3 && - *(res.begin() + 2) == 2 && (res.end() - res.begin()) == 4; + *(res.begin() + 2) == 2 && (res.end() - res.begin()) == 4 && !res.empty() && + res.front() == 0 && res.back() == 3; }; const bool res = kernel_test(test); EXPECT_TRUE(res, "Wrong result of iota_view check within a kernel"); diff --git a/test/xpu_api/ranges/xpu_std_single_view.pass.cpp b/test/xpu_api/ranges/xpu_std_single_view.pass.cpp index 4ed5937407..5824635b7b 100644 --- a/test/xpu_api/ranges/xpu_std_single_view.pass.cpp +++ b/test/xpu_api/ranges/xpu_std_single_view.pass.cpp @@ -28,7 +28,7 @@ main() #if _ENABLE_STD_RANGES_TESTING auto test = [](){ auto res = std::ranges::views::single(1); - return res.size() == 1 && res[0] == 1 && *res.begin() == 1 && res.end() - res.begin() == 1; + return res.size() == 1 && res[0] == 1 && *res.begin() == 1 && res.end() - res.begin() == 1 && *res.data() == 1; }; const bool res = kernel_test(test); EXPECT_TRUE(res, "Wrong result of single_view check within a kernel"); diff --git a/test/xpu_api/ranges/xpu_std_subrange.pass.cpp b/test/xpu_api/ranges/xpu_std_subrange.pass.cpp index 4f081dfb76..bc6df95f8d 100644 --- a/test/xpu_api/ranges/xpu_std_subrange.pass.cpp +++ b/test/xpu_api/ranges/xpu_std_subrange.pass.cpp @@ -29,8 +29,9 @@ main() auto test = [](){ auto v = std::ranges::views::iota(0, 4); auto res = std::ranges::subrange(v.begin() + 1, v.end()); - return res.size() == 3 && res[0] == 0 && res[1] == 1 && res[2] == 2 && - (*res.begin() + 2) == 2 && res.end() - res.begin() == 3; + + return res.size() == 3 && res[0] == 1 && res[1] == 2 && res[2] == 3 && (*res.begin() + 2) == 3 && + res.end() - res.begin() == 3 && *std::ranges::next(res.begin()) == 2 && *std::ranges::prev(res.end()) == 3; }; const bool res = kernel_test(test); EXPECT_TRUE(res, "Wrong result of subrange check within a kernel");