Martin Hořeňovský
a6cf19abff
Make Approx::margin inclusive
...
Fixes #952 , related to #980
2017-10-30 21:33:29 +01:00
Martin Hořeňovský
7a22bad763
Addressed some static analysis warnings
...
Based on findings in #957
2017-07-19 09:50:08 +02:00
Martin Hořeňovský
a34c053f0a
All of Approx's member functions now accept strong typedefs
...
Previously `Approx::operator()`, `Approx::epsilon`, `Approx::margin` and
`Approx::scale` didn't.
Closes #888
2017-04-24 22:01:45 +02:00
Martin Hořeňovský
0354d50278
Added templated constructor to C++11 Approx
...
When using C++11, comparison operators are already templated to take
anything that can be explicitly converted to double, but constructor
took only doubles. This lead to warnings when an `Approx` was
constructed from floats, which was problematic for some users.
Since just adding float constructor would be a large breaking change, as
suddenly `Approx( 1 )` would become ambiguous, I added a templated
constructor that will take anything that is explicitly convertible to
double. This has the added benefit of allowing constructing `Approx`
instances from instances of strong typedefs, ie allowing
`calculated_temp == Approx( known_temp)`.
Closes #873
2017-04-04 15:19:15 +02:00
Martin Hořeňovský
d5c623b3b6
Merge branch 'develop' of https://github.com/CNugteren/Catch
...
This adds an optional absolute margin to the Approx checks.
2017-02-27 13:12:13 +01:00
Martin Hořeňovský
d0620c3495
Added std:: qualification to some functions from C stdlib
...
This should solve #543 , once Clara changes are in as well.
2017-02-11 23:20:09 +01:00
Martin Hořeňovský
60a9ac7e65
Enabled previous commit under MSVC, introduced new feature toggle
2017-01-26 18:47:29 +01:00
Jonathan Coe
c06afe438e
Add support for comparison of Approx with strong typedefs
...
closes #652
2017-01-26 18:44:03 +01:00
Jonathan B. Coe
37e1e24309
add support for inequalities
2017-01-08 22:28:53 +01:00
CNugteren
3523c39f44
Changed 'auto' into 'bool' for C++98 compatibility
2015-11-12 15:31:42 +01:00
cnugteren
2585d280d1
Added an optional absolute margin to the approximation checks
2015-11-12 15:11:36 +01:00
Phil Nash
97150f27ac
Renamed catch_tostring.hpp catch_tostring.h
...
- in preparation for splitting implementation into catch_tostring.hpp
2014-04-23 06:51:58 +01:00
Phil Nash
1aa60fada9
Changed Approx::toString() to be implemented in terms of toString( double ) (as proposed in #233 )
2013-12-19 18:41:55 +00:00
Phil Nash
1e2f1d1603
Fixes toString forward reference issue:
...
- as raised in https://github.com/philsquared/Catch/pull/195
2013-09-14 19:58:45 +01:00
Phil Nash
f3d1f08c3b
Removed all trailing whitespace
...
- addresses #105
2013-07-03 19:14:59 +01:00
Phil Nash
2a9d8d9e36
Changed "const X ref"s to "X const ref"s
...
- Brought older code up to current convention (with the help of a Python script)
2013-04-23 18:58:56 +01:00
Phil Nash
6730512afa
Refactoring ResultData out of ResultInfo/ Builder pt2
2012-10-09 11:48:55 +01:00
Phil Nash
2efc1146bf
Reformatting
2012-05-15 07:42:26 +01:00
Phil Nash
2fa72a47cd
Added ability to build custom Approx instance
2011-06-06 08:21:21 +01:00
Phil Nash
cae44d8ace
Made Approx a little more forgiving (to 100& epsilon of float) and added some more tests for it
2011-06-03 18:56:47 +01:00
Phil Nash
6b6143ccd4
Removed templates from Approx (just uses double)
2011-05-31 07:51:04 +01:00
Phil Nash
0ea29b7d28
Started adding tests for Approx
2011-04-28 08:28:03 +01:00
Phil Nash
dfea75fc05
Allow epsilon and scale to be specified
2011-04-28 08:20:47 +01:00
Phil Nash
d7b8b01f3e
Updated to use Richard Harris' approximation formula
2011-04-28 08:11:00 +01:00
Phil Nash
d7c203c3e9
Factored Approx out into own file
2011-04-28 08:03:28 +01:00