Home
last modified time | relevance | path

Searched refs:Approx (Results 1 – 24 of 24) sorted by relevance

/external/catch2/projects/SelfTest/UsageTests/
DApprox.tests.cpp54 REQUIRE( d == Approx( 1.23 ) );
55 REQUIRE( d != Approx( 1.22 ) );
56 REQUIRE( d != Approx( 1.24 ) );
61 REQUIRE( Approx( d ) == 1.23 );
62 REQUIRE( Approx( d ) != 1.22 );
63 REQUIRE( Approx( d ) != 1.24 );
70 REQUIRE( d != Approx( 1.231 ) );
71 REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) );
78 REQUIRE( d <= Approx( 1.24 ) );
79 REQUIRE( d <= Approx( 1.23 ) );
[all …]
DCondition.tests.cpp61 REQUIRE( data.float_nine_point_one == Approx( 9.1f ) );
62 REQUIRE( data.double_pi == Approx( 3.1415926535 ) );
68 REQUIRE( x == Approx( 1.3 ) );
78 CHECK( data.float_nine_point_one == Approx( 9.11f ) );
79 CHECK( data.float_nine_point_one == Approx( 9.0f ) );
80 CHECK( data.float_nine_point_one == Approx( 1 ) );
81 CHECK( data.float_nine_point_one == Approx( 0 ) );
82 CHECK( data.double_pi == Approx( 3.1415 ) );
89 CHECK( x == Approx( 1.301 ) );
98 REQUIRE( data.float_nine_point_one != Approx( 9.11f ) );
[all …]
DMatchers.tests.cpp516 using Catch::Matchers::Approx;
519 REQUIRE_THAT(empty, Approx(empty));
524 REQUIRE_THAT(v1, Approx(v1));
530 REQUIRE_THAT(v1, !Approx(temp));
533 REQUIRE_THAT(v1, !Approx(v2));
534 REQUIRE_THAT(v1, Approx(v2).margin(0.5));
535 REQUIRE_THAT(v1, Approx(v2).epsilon(0.5));
536 REQUIRE_THAT(v1, Approx(v2).epsilon(0.1).scale(500));
542 using Catch::Matchers::Approx;
545 CHECK_THAT(empty, Approx(t1));
[all …]
/external/catch2/include/internal/
Dcatch_approx.cpp28 Approx::Approx ( double value ) in Approx() function in Catch::Detail::Approx
35 Approx Approx::custom() { in custom()
36 return Approx( 0 ); in custom()
39 Approx Approx::operator-() const { in operator -()
46 std::string Approx::toString() const { in toString()
52 bool Approx::equalityComparisonImpl(const double other) const { in equalityComparisonImpl()
59 void Approx::setMargin(double newMargin) { in setMargin()
66 void Approx::setEpsilon(double newEpsilon) { in setEpsilon()
76 Detail::Approx operator "" _a(long double val) { in operator ""_a()
77 return Detail::Approx(val); in operator ""_a()
[all …]
Dcatch_approx.h18 class Approx {
29 explicit Approx ( double value );
31 static Approx custom();
33 Approx operator-() const;
36 Approx operator()( T const& value ) { in operator()
37 Approx approx( static_cast<double>(value) ); in operator()
45 explicit Approx( T const& value ): Approx(static_cast<double>(value)) in Approx() function
50 friend bool operator == ( const T& lhs, Approx const& rhs ) {
56 friend bool operator == ( Approx const& lhs, const T& rhs ) {
61 friend bool operator != ( T const& lhs, Approx const& rhs ) {
[all …]
Dcatch_matchers_vector.h127 mutable Catch::Detail::Approx approx = Catch::Detail::Approx::custom();
170 Vector::ApproxMatcher<T> Approx( std::vector<T> const& comparator ) { in Approx() function
/external/catch2/projects/SelfTest/Baselines/
Dcompact.sw.approved.txt190 Approx.tests.cpp:<line number>: passed: d == 1.23_a for: 1.23 == Approx( 1.23 )
191 Approx.tests.cpp:<line number>: passed: d != 1.22_a for: 1.23 != Approx( 1.22 )
192 Approx.tests.cpp:<line number>: passed: -d == -1.23_a for: -1.23 == Approx( -1.23 )
193 Approx.tests.cpp:<line number>: passed: d == 1.2_a .epsilon(.1) for: 1.23 == Approx( 1.2 )
194 Approx.tests.cpp:<line number>: passed: d != 1.2_a .epsilon(.001) for: 1.23 != Approx( 1.2 )
195 Approx.tests.cpp:<line number>: passed: d == 1_a .epsilon(.3) for: 1.23 == Approx( 1.0 )
200 Approx.tests.cpp:<line number>: passed: 104.0 != Approx(100.0) for: 104.0 != Approx( 100.0 )
201 Approx.tests.cpp:<line number>: passed: 104.0 == Approx(100.0).margin(5) for: 104.0 == Approx( 100.…
202 Approx.tests.cpp:<line number>: passed: 104.0 == Approx(100.0).margin(4) for: 104.0 == Approx( 100.…
203 Approx.tests.cpp:<line number>: passed: 104.0 != Approx(100.0).margin(3) for: 104.0 != Approx( 100.…
[all …]
Dconsole.sw.approved.txt1539 Approx.tests.cpp:<line number>
1542 Approx.tests.cpp:<line number>: PASSED:
1545 1.23 == Approx( 1.23 )
1547 Approx.tests.cpp:<line number>: PASSED:
1550 1.23 != Approx( 1.22 )
1552 Approx.tests.cpp:<line number>: PASSED:
1555 -1.23 == Approx( -1.23 )
1557 Approx.tests.cpp:<line number>: PASSED:
1560 1.23 == Approx( 1.2 )
1562 Approx.tests.cpp:<line number>: PASSED:
[all …]
Dconsole.std.approved.txt416 CHECK( data.float_nine_point_one == Approx( 9.11f ) )
418 9.1f == Approx( 9.1099996567 )
421 CHECK( data.float_nine_point_one == Approx( 9.0f ) )
423 9.1f == Approx( 9.0 )
426 CHECK( data.float_nine_point_one == Approx( 1 ) )
428 9.1f == Approx( 1.0 )
431 CHECK( data.float_nine_point_one == Approx( 0 ) )
433 9.1f == Approx( 0.0 )
436 CHECK( data.double_pi == Approx( 3.1415 ) )
438 3.1415926535 == Approx( 3.1415 )
[all …]
/external/catch2/docs/
Dassertions.md58 …ons of floating point values through use of a wrapper class called `Approx`. `Approx` can be used …
61 REQUIRE( performComputation() == Approx( 2.1 ) );
64 Catch also provides a user-defined literal for `Approx`; `_a`. It resides in
71 `Approx` is constructed with defaults that should cover most simple cases.
72 For the more complex cases, `Approx` provides 3 customization points:
75 can differ from `Approx`'s value before it is rejected.
78 a result can differ from `Approx`'s value before it is rejected.
80 * __scale__ - scale is used to change the magnitude of `Approx` for relative check.
85 Approx target = Approx(100).epsilon(0.01);
93 Approx target = Approx(100).margin(5);
[all …]
Dlist-of-examples.md31 - Floating point: [Approx - Comparisons](../examples/130-Fpt-Approx.cpp)
Drelease-notes.md141 * Special cased `Approx(inf)` not to match non-infinite values
149 * Unlike `Approx`, it considers both sides when determining the allowed margin
681 * `Approx` is subtly different and hopefully behaves more as users would expect
682 * `Approx::scale` defaults to `0.0`
683 …* `Approx::epsilon` no longer applies to the larger of the two compared values, but only to the `A…
684 * `INFINITY == Approx(INFINITY)` returns true
770 * `Approx::Margin` is now inclusive (#952)
772 * This means that `REQUIRE( 0.25f == Approx( 0.0f ).margin( 0.25f ) )` passes, instead of fails
843 * All of `Approx`'s member functions now accept strong typedefs in C++11 mode (#888)
844 * Previously `Approx::scale`, `Approx::epsilon`, `Approx::margin` and `Approx::operator()` didn't.
[all …]
Dmatchers.md81 …* `Approx` which checks whether the result is "approx-equal" (order matters, but comparison is don…
82 > Approx matcher was [introduced](https://github.com/catchorg/Catch2/issues/1499) in Catch 2.7.2.
Dwhy-catch.md34 * Floating point tolerance comparisons are built in using an expressive Approx() syntax.
/external/catch2/projects/SelfTest/IntrospectiveTests/
DInternalBenchmark.tests.cpp157 CHECK(normal_cdf(0.000000) == Approx(0.50000000000000000));
158 CHECK(normal_cdf(1.000000) == Approx(0.84134474606854293));
159 CHECK(normal_cdf(-1.000000) == Approx(0.15865525393145705));
160 CHECK(normal_cdf(2.809729) == Approx(0.99752083845315409));
161 CHECK(normal_cdf(-1.352570) == Approx(0.08809652095066035));
166 CHECK(erfc_inv(1.103560) == Approx(-0.09203687623843015));
167 CHECK(erfc_inv(1.067400) == Approx(-0.05980291115763361));
168 CHECK(erfc_inv(0.050000) == Approx(1.38590382434967796));
173 CHECK(normal_quantile(0.551780) == Approx(0.13015979861484198));
174 CHECK(normal_quantile(0.533700) == Approx(0.08457408802851875));
[all …]
DGeneratorsImpl.tests.cpp187 REQUIRE(gen.get() == Approx(expected));
192 REQUIRE(gen.get() == Approx( rangeEnd ) );
204 REQUIRE(gen.get() == Approx(expected));
220 REQUIRE(gen.get() == Approx(expected));
DCmdLine.tests.cpp533 REQUIRE(config.benchmarkConfidenceInterval == Catch::Detail::Approx(0.99));
/external/icu/icu4c/source/data/brkitr/
Den.txt9 "Approx.",
/external/catch2/include/
Dcatch.hpp309 using Catch::Detail::Approx;
487 using Catch::Detail::Approx;
/external/catch2/single_include/catch2/
Dcatch.hpp3048 class Approx { class
3059 explicit Approx ( double value );
3061 static Approx custom();
3063 Approx operator-() const;
3066 Approx operator()( T const& value ) { in operator ()()
3067 Approx approx( static_cast<double>(value) ); in operator ()()
3075 explicit Approx( T const& value ): Approx(static_cast<double>(value)) in Approx() function in Catch::Detail::Approx
3079 friend bool operator == ( const T& lhs, Approx const& rhs ) { in operator ==()
3085 friend bool operator == ( Approx const& lhs, const T& rhs ) { in operator ==()
3090 friend bool operator != ( T const& lhs, Approx const& rhs ) { in operator !=()
[all …]
/external/libabigail/tests/lib/
Dcatch.hpp3074 class Approx { class
3085 explicit Approx ( double value );
3087 static Approx custom();
3089 Approx operator-() const;
3092 Approx operator()( T const& value ) { in operator ()()
3093 Approx approx( static_cast<double>(value) ); in operator ()()
3101 explicit Approx( T const& value ): Approx(static_cast<double>(value)) in Approx() function in Catch::Detail::Approx
3105 friend bool operator == ( const T& lhs, Approx const& rhs ) { in operator ==()
3111 friend bool operator == ( Approx const& lhs, const T& rhs ) { in operator ==()
3116 friend bool operator != ( T const& lhs, Approx const& rhs ) { in operator !=()
[all …]
/external/bcc/tests/cc/
Dcatch.hpp2621 class Approx { class
2623 explicit Approx ( double value ) in Approx() function in Catch::Detail::Approx
2629 Approx( Approx const& other ) in Approx() function in Catch::Detail::Approx
2635 static Approx custom() { in custom()
2636 return Approx( 0 ); in custom()
2639 Approx operator()( double value ) { in operator ()()
2640 Approx approx( value ); in operator ()()
2646 friend bool operator == ( double lhs, Approx const& rhs ) { in operator ==()
2651 friend bool operator == ( Approx const& lhs, double rhs ) { in operator ==()
2655 friend bool operator != ( double lhs, Approx const& rhs ) { in operator !=()
[all …]
/external/catch2/projects/
DCMakeLists.txt30 ${SELF_TEST_DIR}/UsageTests/Approx.tests.cpp
434 set_tests_properties(FilenameAsTagsTest PROPERTIES PASS_REGULAR_EXPRESSION "\\[#Approx.tests\\]")
/external/bzip2/
DREADME147 * Approx 10% faster compression, 30% faster decompression