test_checked_comparison.hpp 962 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #ifndef BOOST_SAFE_NUMERICS_TEST_CHECKED_COMPARISON_HPP
  2. #define BOOST_SAFE_NUMERICS_TEST_CHECKED_COMPARISON_HPP
  3. // Copyright (c) 2018 Robert Ramey
  4. //
  5. // Distributed under the Boost Software License, Version 1.0. (See
  6. // accompanying file LICENSE_1_0.txt or copy at
  7. // http://www.boost.org/LICENSE_1_0.txt)
  8. #include "test_checked_values.hpp"
  9. // test result matrices
  10. // key
  11. // < less than
  12. // > greater than
  13. // = equal to
  14. // ! indeterminant
  15. constexpr const char * signed_comparison_results[] = {
  16. // 012345678
  17. /* 0*/ "!!!!!!!!!",
  18. /* 1*/ "!!!!!!!!!",
  19. /* 2*/ "!!!>>>>>>",
  20. /* 3*/ "!!<=>>>>>",
  21. /* 4*/ "!!<<=>>>>",
  22. /* 5*/ "!!<<<=>>>",
  23. /* 6*/ "!!<<<<=>>",
  24. /* 7*/ "!!<<<<<=>",
  25. /* 8*/ "!!<<<<<<!",
  26. };
  27. constexpr const char * unsigned_comparison_results[] = {
  28. // 0123456
  29. /* 0*/ "!!!!!!!",
  30. /* 1*/ "!!!!!!!",
  31. /* 2*/ "!!!>>>>",
  32. /* 3*/ "!!<=>>>",
  33. /* 4*/ "!!<<=>>",
  34. /* 5*/ "!!<<<=>",
  35. /* 6*/ "!!<<<<!",
  36. };
  37. #endif // BOOST_SAFE_NUMERICS_TEST_CHECKED_COMPARISON_HPP