Skip to content

Commit

Permalink
WIP test: with LB size 0
Browse files Browse the repository at this point in the history
  • Loading branch information
SylvainJoube committed May 2, 2024
1 parent 368e896 commit fad6682
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 27 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,7 @@ test/sycl_sandbox/test_templates_include.hpp
test/sycl_sandbox/test_templates.cpp
exec.sh
*.save
*.txt
*.txt

*.inactive
*.ignore
1 change: 1 addition & 0 deletions CMakeFiles/cmake.check_cache
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# This file is generated by cmake for dependency checking of the CMakeCache.txt file
52 changes: 26 additions & 26 deletions test/algorithm/algos/binary_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,32 +147,32 @@ TTS_CASE("Check for kwk::lower_bound(In, value, func) 1D with function")
// std::cout << (*kwk::lower_bound(view, 21))[0] << std::endl;
};

// TTS_CASE("Check for kwk::lower_bound 1D: size 0")
// {
// const std::size_t input_size = 0;
// std::array<int, input_size> input;
// auto view = kwk::view{kwk::source = input, kwk::of_size(input_size)};
// auto func = [](auto const& input_, auto const& element_) { return input_ < (element_ - 10) * 2; };

// LB_ERROR(input, view, -2984612);
// LB_ERROR(input, view, -2);
// LB_ERROR(input, view, 0);
// LB_ERROR(input, view, 5);
// LB_ERROR(input, view, 19);
// LB_ERROR(input, view, 20);
// LB_ERROR(input, view, 21);
// LB_ERROR(input, view, 78456465);

// LB_ERROR_FUNC(input, view, func, -2984612);
// LB_ERROR_FUNC(input, view, func, -2);
// LB_ERROR_FUNC(input, view, func, 0);
// LB_ERROR_FUNC(input, view, func, 5);
// LB_ERROR_FUNC(input, view, func, 9);
// LB_ERROR_FUNC(input, view, func, 19);
// LB_ERROR_FUNC(input, view, func, 20);
// LB_ERROR_FUNC(input, view, func, 21);
// LB_ERROR_FUNC(input, view, func, 78456465);
// };
TTS_CASE("Check for kwk::lower_bound 1D: size 0")
{
const std::size_t input_size = 0;
std::array<int, input_size> input;
auto view = kwk::view{kwk::source = input, kwk::of_size(input_size)};
auto func = [](auto const& input_, auto const& element_) { return input_ < (element_ - 10) * 2; };

LB_ERROR(input, view, -2984612);
LB_ERROR(input, view, -2);
LB_ERROR(input, view, 0);
LB_ERROR(input, view, 5);
LB_ERROR(input, view, 19);
LB_ERROR(input, view, 20);
LB_ERROR(input, view, 21);
LB_ERROR(input, view, 78456465);

LB_ERROR_FUNC(input, view, func, -2984612);
LB_ERROR_FUNC(input, view, func, -2);
LB_ERROR_FUNC(input, view, func, 0);
LB_ERROR_FUNC(input, view, func, 5);
LB_ERROR_FUNC(input, view, func, 9);
LB_ERROR_FUNC(input, view, func, 19);
LB_ERROR_FUNC(input, view, func, 20);
LB_ERROR_FUNC(input, view, func, 21);
LB_ERROR_FUNC(input, view, func, 78456465);
};


TTS_CASE("Check for kwk::upper_bound(In, value) 1D ---------")
Expand Down

0 comments on commit fad6682

Please sign in to comment.