Changeset 2274 for trunk/test/utility_test.cc
- Timestamp:
- Jun 23, 2010, 12:02:30 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/utility_test.cc
r2273 r2274 63 63 void test_less_nan(test::Suite& suite); 64 64 void test_ptr_compare(test::Suite& suite); 65 void test_compose_functors(test::Suite& suite); 65 66 66 67 int main(int argc, char* argv[]) … … 175 176 test_load2(suite); 176 177 178 test_compose_functors(suite); 179 177 180 return suite.return_value(); 178 181 } … … 200 203 suite.add(false); 201 204 } 205 206 207 void test_compose_functors(test::Suite& suite) 208 { 209 typedef utility::abs<double> U1; 210 // we use float here to check conversion from float to double in functors 211 typedef utility::Exp<float> U2; 212 typedef std::plus<double> B; 213 U1 u1; 214 U2 u2; 215 B b; 216 217 utility::compose_f_gx_hy<B, U1, U2> binary = 218 utility::make_compose_f_gx_hy(b, u1, u2); 219 220 utility::compose_f_gxy<U2, B> binary2 = 221 utility::make_compose_f_gxy(u2, b); 222 223 utility::compose_f_gx<U1, U2> unary = 224 utility::make_compose_f_gx(u1, u2); 225 } 226 202 227 203 228
Note: See TracChangeset
for help on using the changeset viewer.