test_subtract_automatic_results.hpp 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. #ifndef BOOST_SAFE_NUMERICS_TEST_ADD_AUTOMATIC_RESULTS_HPP
  2. #define BOOST_SAFE_NUMERICS_TEST_ADD_AUTOMATIC_RESULTS_HPP
  3. // Copyright (c) 2019 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_values.hpp"
  9. // note: same test matrix as used in test_checked. Here we test all combinations
  10. // safe and unsafe integers. in test_checked we test all combinations of
  11. // integer primitives
  12. constexpr const char *test_subtraction_automatic_result[
  13. boost::mp11::mp_size<test_values>::value
  14. ] = {
  15. // 0 0 0 0
  16. // 012345670123456701234567012345670
  17. // 012345678901234567890123456789012
  18. /* 0*/ "..............x...............xx.",
  19. /* 1*/ "..............x...............xx.",
  20. /* 2*/ ".............x...............xxx.",
  21. /* 3*/ "..............................xx.",
  22. /* 4*/ "..............x...............xx.",
  23. /* 5*/ "..............x...............xx.",
  24. /* 6*/ ".............x...............xxx.",
  25. /* 7*/ "..............................xx.",
  26. /* 8*/ "..............x...............xx.",
  27. /* 9*/ "..............x...............xx.",
  28. /*10*/ ".............x...............xxx.",
  29. /*11*/ "..............................xx.",
  30. /*12*/ "..............x...............xx.",
  31. /*13*/ "..xx..xx..xx..xx..............xx.",
  32. /*14*/ "xx..xx..xx..xx..xxxxxxxxxxxxxxxx.",
  33. /*15*/ "..............................xx.",
  34. // 0 0 0 0
  35. // 012345670123456701234567012345670
  36. // 012345678901234567890123456789012
  37. /*16*/ "..............x...............xx.",
  38. /*17*/ "..............x...............xx.",
  39. /*18*/ "..............x...............xx.",
  40. /*19*/ "..............x...............xx.",
  41. /*20*/ "..............x...............xx.",
  42. /*21*/ "..............x...............xx.",
  43. /*22*/ "..............x...............xx.",
  44. /*23*/ "..............x...............xx.",
  45. /*24*/ "..............x...............xx.",
  46. /*25*/ "..............x...............xx.",
  47. /*26*/ "..............x...............xx.",
  48. /*27*/ "..............x...............xx.",
  49. /*28*/ "..............x...............xx.",
  50. /*29*/ "..xx..xx..xx..xx..............xx.",
  51. /*30*/ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  52. /*31*/ "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
  53. /*32*/ "..............x...............xx."
  54. };
  55. #endif