Revision 1303 trunk/tests/gtests/test_atan2.cpp
test_atan2.cpp (revision 1303)  

12  12  
13  13 
class test_atan2: public ::testing::Test {}; 
14  14  
15 
gradient_structure gs(1500000L); 

16  15 
/** 
17  16 
* Test atan2 for x greater than zero. 
18  17 
*/ 
19  18 
TEST_F(test_atan2, x_greater_than_zero) 
20  19 
{ 
20 
gradient_structure gs(1500000L); 

21  21 
dvariable y = 10.0; 
22  22 
dvariable x = 10.0; 
23  23 
const double v = value(atan2(y, x)); 
...  ...  
37  37 
*/ 
38  38 
TEST_F(test_atan2, y_greater_than_or_equal_zero_x_less_than_zero) 
39  39 
{ 
40 
gradient_structure gs(1500000L); 

40  41 
dvariable y = 10.0; 
41  42 
dvariable x = 10.0; 
42  43 
//const double pi = std::atan(1.0)*4.0; 
...  ...  
58  59 
*/ 
59  60 
TEST_F(test_atan2, y_and_x_less_than_zero) 
60  61 
{ 
62 
gradient_structure gs(1500000L); 

61  63 
dvariable y = 10.0; 
62  64 
dvariable x = 10.0; 
63  65 
//const double pi = std::atan(1.0)*4.0; 
...  ...  
79  81 
*/ 
80  82 
TEST_F(test_atan2, y_greater_than_zero_and_x_equal_zero) 
81  83 
{ 
84 
gradient_structure gs(1500000L); 

82  85 
dvariable y = 10.0; 
83  86 
dvariable x = 0.0; 
84  87 
//const double pi_2 = std::atan(1.0)*2.0; 
...  ...  
100  103 
*/ 
101  104 
TEST_F(test_atan2, y_equal_zero_and_x_less_than_zero) 
102  105 
{ 
106 
gradient_structure gs(1500000L); 

103  107 
dvariable y = 0.0; 
104  108 
dvariable x = 1.0; 
105  109 
//const double pi_2 = 1.0*std::atan(1.0)*2.0; 
...  ...  
121  125 
*/ 
122  126 
TEST_F(test_atan2, y_equal_zero_and_x_greater_than_zero) 
123  127 
{ 
128 
gradient_structure gs(1500000L); 

124  129 
dvariable y = 0.0; 
125  130 
dvariable x = 1.0; 
126  131 
//const double pi_2 = 1.0*std::atan(1.0)*2.0; 
...  ...  
142  147 
*/ 
143  148 
TEST_F(test_atan2, y_less_than_zero_and_x_equal_zero) 
144  149 
{ 
150 
gradient_structure gs(1500000L); 

145  151 
dvariable y = 10.0; 
146  152 
dvariable x = 0.0; 
147  153 
//const double pi_2 = 1.0*std::atan(1.0)*2.0; 
...  ...  
163  169 
*/ 
164  170 
TEST_F(test_atan2, y_and_x_equal_zero) 
165  171 
{ 
172 
gradient_structure gs(1500000L); 

166  173 
ad_exit=&test_ad_exit; 
167  174 
try 
168  175 
{ 
Also available in: Unified diff