Files
safe_numerics/test/test_subtract.cpp
Robert Ramey 12f5843f90 Fixed problems in testing addition operations
More carefully defined the concepts.  That is the concept of the library is now clear:

Trap at either compile or runtime integer operations which yield a result which differs from the normal arithmetic result.

Pending on this check in:
a) only addition is fixed up so far
b) uses BOOST_TYPEOF... rather than decltype(... - final decision sill pending.
c) comments out some compile time checks which should be re-instated.
d) fixed tests so that they actually work!
2014-04-05 12:22:25 -07:00

18 lines
425 B
C++

// Copyright (c) 2012 Robert Ramey
//
// Distributed under the Boost Software License, Version 1.0. (See
// accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)
#include "test_subtract.hpp"
#define TESTX(a, b) \
rval &= test_subtract(a, b, BOOST_PP_STRINGIZE(a), BOOST_PP_STRINGIZE(b));
/**/
int main(int argc, char * argv[]){
bool rval = true;
TEST_ALL
return ! rval ;
}