constants.cpp
Go to the documentation of this file.
1 
9 /*****************************************************************************
10 ** Includes
11 *****************************************************************************/
12 
13 #include <iostream>
14 #include <gtest/gtest.h>
15 #include "../../include/ecl/math/constants.hpp"
16 
17 /*****************************************************************************
18 ** Tests
19 *****************************************************************************/
20 
21 TEST(MathTests,pi) {
22  EXPECT_EQ(3.141592653589793238462643383279502884197169399375105820974944, ecl::pi);
23  EXPECT_EQ(1.57079632679489661923,ecl::pi_2);
24  EXPECT_EQ(0.78539816339744830962,ecl::pi_4);
25 }
26 
27 /*****************************************************************************
28 ** Main program
29 *****************************************************************************/
30 
31 int main(int argc, char **argv) {
32 
33  testing::InitGoogleTest(&argc,argv);
34  return RUN_ALL_TESTS();
35 }
36 
TEST(MathTests, pi)
Definition: constants.cpp:21
double const pi
Mathematical constant for pi.
Definition: constants.hpp:37
const double pi_4
Mathematical constant for pi/4.
Definition: constants.hpp:40
int main(int argc, char **argv)
Definition: constants.cpp:31
const double pi_2
Mathematical constant for pi/2.
Definition: constants.hpp:39


ecl_math
Author(s): Daniel Stonier
autogenerated on Mon Jun 10 2019 13:08:25