Changeset 10984 for code/branches/cpp11_v2/test/core/command/FunctorTest.cc
- Timestamp:
- Dec 27, 2015, 11:40:47 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/cpp11_v2/test/core/command/FunctorTest.cc
r10983 r10984 316 316 { 317 317 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method2); 318 float result = (*functor)(&object, 0, 111.11 );319 EXPECT_FLOAT_EQ(111.11 , result);318 float result = (*functor)(&object, 0, 111.11f); 319 EXPECT_FLOAT_EQ(111.11f, result); 320 320 } 321 321 { … … 486 486 } 487 487 { 488 EXPECT_CALL(mock, method2(13, 111.11 )).WillOnce(::testing::Return(0.0));488 EXPECT_CALL(mock, method2(13, 111.11f)).WillOnce(::testing::Return(0.0f)); 489 489 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method2); 490 (*functor)(&mock, 13, 111.11 );491 } 492 { 493 EXPECT_CALL(mock, method3(13, 111.11 , true)).WillOnce(::testing::Return(false));490 (*functor)(&mock, 13, 111.11f); 491 } 492 { 493 EXPECT_CALL(mock, method3(13, 111.11f, true)).WillOnce(::testing::Return(false)); 494 494 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method3); 495 (*functor)(&mock, 13, 111.11 , true);496 } 497 { 498 EXPECT_CALL(mock, method4(13, 111.11 , true, "test")).WillOnce(::testing::Return(""));495 (*functor)(&mock, 13, 111.11f, true); 496 } 497 { 498 EXPECT_CALL(mock, method4(13, 111.11f, true, "test")).WillOnce(::testing::Return("")); 499 499 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method4); 500 (*functor)(&mock, 13, 111.11 , true, "test");501 } 502 { 503 EXPECT_CALL(mock, method5(13, 111.11 , true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3()));500 (*functor)(&mock, 13, 111.11f, true, "test"); 501 } 502 { 503 EXPECT_CALL(mock, method5(13, 111.11f, true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3())); 504 504 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method5); 505 (*functor)(&mock, 13, 111.11 , true, "test", Vector3(3, 2, 1));505 (*functor)(&mock, 13, 111.11f, true, "test", Vector3(3, 2, 1)); 506 506 } 507 507 } … … 521 521 } 522 522 { 523 EXPECT_CALL(mock, method2(13, 111.11 )).WillOnce(::testing::Return(0.0));523 EXPECT_CALL(mock, method2(13, 111.11f)).WillOnce(::testing::Return(0.0f)); 524 524 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method2, &mock); 525 (*functor)(13, 111.11 );526 } 527 { 528 EXPECT_CALL(mock, method3(13, 111.11 , true)).WillOnce(::testing::Return(false));525 (*functor)(13, 111.11f); 526 } 527 { 528 EXPECT_CALL(mock, method3(13, 111.11f, true)).WillOnce(::testing::Return(false)); 529 529 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method3, &mock); 530 (*functor)(13, 111.11 , true);531 } 532 { 533 EXPECT_CALL(mock, method4(13, 111.11 , true, "test")).WillOnce(::testing::Return(""));530 (*functor)(13, 111.11f, true); 531 } 532 { 533 EXPECT_CALL(mock, method4(13, 111.11f, true, "test")).WillOnce(::testing::Return("")); 534 534 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method4, &mock); 535 (*functor)(13, 111.11 , true, "test");536 } 537 { 538 EXPECT_CALL(mock, method5(13, 111.11 , true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3()));535 (*functor)(13, 111.11f, true, "test"); 536 } 537 { 538 EXPECT_CALL(mock, method5(13, 111.11f, true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3())); 539 539 FunctorMemberPtr<DestroyableClass> functor = createFunctor(&DestroyableClass::method5, &mock); 540 (*functor)(13, 111.11 , true, "test", Vector3(3, 2, 1));540 (*functor)(13, 111.11f, true, "test", Vector3(3, 2, 1)); 541 541 } 542 542 } … … 575 575 } 576 576 { 577 EXPECT_CALL(mock, method2(13, 111.11 )).WillOnce(::testing::Return(0.0));577 EXPECT_CALL(mock, method2(13, 111.11f)).WillOnce(::testing::Return(0.0f)); 578 578 FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod2); 579 (*functor)(13, 111.11 );580 } 581 { 582 EXPECT_CALL(mock, method3(13, 111.11 , true)).WillOnce(::testing::Return(false));579 (*functor)(13, 111.11f); 580 } 581 { 582 EXPECT_CALL(mock, method3(13, 111.11f, true)).WillOnce(::testing::Return(false)); 583 583 FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod3); 584 (*functor)(13, 111.11 , true);585 } 586 { 587 EXPECT_CALL(mock, method4(13, 111.11 , true, "test")).WillOnce(::testing::Return(""));584 (*functor)(13, 111.11f, true); 585 } 586 { 587 EXPECT_CALL(mock, method4(13, 111.11f, true, "test")).WillOnce(::testing::Return("")); 588 588 FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod4); 589 (*functor)(13, 111.11 , true, "test");590 } 591 { 592 EXPECT_CALL(mock, method5(13, 111.11 , true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3()));589 (*functor)(13, 111.11f, true, "test"); 590 } 591 { 592 EXPECT_CALL(mock, method5(13, 111.11f, true, "test", Vector3(3, 2, 1))).WillOnce(::testing::Return(Vector3())); 593 593 FunctorStaticPtr functor = createFunctor(&DestroyableClass::staticmethod5); 594 (*functor)(13, 111.11 , true, "test", Vector3(3, 2, 1));594 (*functor)(13, 111.11f, true, "test", Vector3(3, 2, 1)); 595 595 } 596 596 }
Note: See TracChangeset
for help on using the changeset viewer.