• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 #ifndef BOOST_SAFE_NUMERICS_TEST_CHECKED_MODULUS_HPP
2 #define BOOST_SAFE_NUMERICS_TEST_CHECKED_MODULUS_HPP
3 
4 //  Copyright (c) 2018 Robert Ramey
5 //
6 // Distributed under the Boost Software License, Version 1.0. (See
7 // accompanying file LICENSE_1_0.txt or copy at
8 // http://www.boost.org/LICENSE_1_0.txt)
9 
10 #include "test_checked_values.hpp"
11 
12 // test result matrices
13 
14 // key
15 // . success
16 // - negative_overflow_error
17 // + positive_overflow_error
18 // ! range_error
19 
20 constexpr const char * signed_modulus_results[] = {
21 //      012345678
22 /* 0*/ "!!!!!!!!!",
23 /* 1*/ "!!!!!!!!!",
24 /* 2*/ "!!!.0!.-!",
25 /* 3*/ "!!...!...",
26 /* 4*/ "!!...!...",
27 /* 5*/ "!!000!000",
28 /* 6*/ "!!...!...",
29 /* 7*/ "!!...!...",
30 /* 8*/ "!!!..!.+!",
31 };
32 
33 constexpr const char * unsigned_modulus_results[] = {
34 //      0123456
35 /* 0*/ "!!!!!!!",
36 /* 1*/ "!!!!!!!",
37 /* 2*/ "!!!.0!!",
38 /* 3*/ "!!...!.",
39 /* 4*/ "!!...!.",
40 /* 5*/ "!!000!0",
41 /* 6*/ "!!!-.!!",
42 };
43 
44 #endif // BOOST_SAFE_NUMERICS_TEST_CHECKED_MODULUS_HPP
45