Searched refs:custom_real (Results 1 – 5 of 5) sorted by relevance
/third_party/boost/libs/spirit/test/x3/ |
D | real4.cpp | 28 constexpr real_parser<real_concept, real_policies<real_concept> > custom_real; in main() local 31 BOOST_SPIRIT_ASSERT_CONSTEXPR_CTORS(custom_real); in main() 33 BOOST_TEST(test("-1234", custom_real)); in main() 34 BOOST_TEST(test_attr("-1234", custom_real, d) && compare(d, -1234)); in main() 36 BOOST_TEST(test("-1.2e3", custom_real)); in main() 37 BOOST_TEST(test_attr("-1.2e3", custom_real, d) && compare(d, -1.2e3)); in main() 39 BOOST_TEST(test("+1.2e3", custom_real)); in main() 40 BOOST_TEST(test_attr("+1.2e3", custom_real, d) && compare(d, 1.2e3)); in main() 42 BOOST_TEST(test("-0.1", custom_real)); in main() 43 BOOST_TEST(test_attr("-0.1", custom_real, d) && compare(d, -0.1)); in main() [all …]
|
D | real.hpp | 107 struct custom_real struct 110 custom_real() : n(0) {} in custom_real() argument 111 custom_real(double n_) : n(n_) {} in custom_real() argument 112 friend bool operator==(custom_real a, custom_real b) in operator ==() 114 friend custom_real operator*(custom_real a, custom_real b) in operator *() 115 { return custom_real(a.n * b.n); } in operator *() 116 friend custom_real operator+(custom_real a, custom_real b) in operator +() 117 { return custom_real(a.n + b.n); } in operator +() 118 friend custom_real operator-(custom_real a, custom_real b) in operator -() 119 { return custom_real(a.n - b.n); } in operator -()
|
/third_party/boost/libs/spirit/test/qi/ |
D | real4.cpp | 28 real_parser<real_concept, real_policies<real_concept> > custom_real; in main() local 31 BOOST_TEST(test("-1234", custom_real)); in main() 32 BOOST_TEST(test_attr("-1234", custom_real, d) && compare(d, -1234)); in main() 34 BOOST_TEST(test("-1.2e3", custom_real)); in main() 35 BOOST_TEST(test_attr("-1.2e3", custom_real, d) && compare(d, -1.2e3)); in main() 37 BOOST_TEST(test("+1.2e3", custom_real)); in main() 38 BOOST_TEST(test_attr("+1.2e3", custom_real, d) && compare(d, 1.2e3)); in main() 40 BOOST_TEST(test("-0.1", custom_real)); in main() 41 BOOST_TEST(test_attr("-0.1", custom_real, d) && compare(d, -0.1)); in main() 43 BOOST_TEST(test("-1.2e-3", custom_real)); in main() [all …]
|
D | real.hpp | 110 struct custom_real struct 113 custom_real() : n(0) {} in custom_real() function 114 custom_real(double n_) : n(n_) {} in custom_real() function 115 friend bool operator==(custom_real a, custom_real b) in operator ==() 117 friend custom_real operator*(custom_real a, custom_real b) in operator *() 118 { return custom_real(a.n * b.n); } in operator *() 119 friend custom_real operator+(custom_real a, custom_real b) in operator +() 120 { return custom_real(a.n + b.n); } in operator +() 121 friend custom_real operator-(custom_real a, custom_real b) in operator -() 122 { return custom_real(a.n - b.n); } in operator -()
|
D | real5.cpp | 84 real_parser<real_concept, real_policies<real_concept> > custom_real; in main() local 87 BOOST_TEST(test("-1234", custom_real(-1234))); in main() 88 BOOST_TEST(!test("-1234", custom_real(4321))); in main() 89 BOOST_TEST(test_attr("-1234", custom_real(-1234), d)); in main() 91 BOOST_TEST(!test_attr("-1234", custom_real(-4321), d)); in main() 93 BOOST_TEST(test("1.2e3", custom_real(1.2e3))); in main() 94 BOOST_TEST(!test("1.2e3", custom_real(-1.2e3))); in main() 95 BOOST_TEST(test_attr("1.2e3", custom_real(1.2e3), d)); in main() 97 BOOST_TEST(!test_attr("1.2e3", custom_real(-3.2e1), d)); in main()
|