Changeset 9226 for code/branches/testing/test/util
- Timestamp:
- May 20, 2012, 12:52:15 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/testing/test/util/MultiTypeTest.cc
r9225 r9226 29 29 // ? getPointer() 30 30 31 // x hasDefaultValue()31 // x lastConversionSuccessful() 32 32 // x null() 33 33 … … 142 142 EXPECT_TRUE(mt.isType<Vector3>()); 143 143 EXPECT_EQ(Vector3(1, 2, 3), mt.get<Vector3>()); 144 EXPECT_ FALSE(mt.hasDefaultValue());144 EXPECT_TRUE(mt.lastConversionSuccessful()); 145 145 146 146 mt = 77.7f; … … 148 148 EXPECT_TRUE(mt.isType<Vector3>()); 149 149 EXPECT_EQ(Vector3::ZERO, mt.get<Vector3>()); 150 EXPECT_ TRUE(mt.hasDefaultValue());150 EXPECT_FALSE(mt.lastConversionSuccessful()); 151 151 } 152 152 … … 254 254 EXPECT_TRUE(mt.isType<int>()); 255 255 EXPECT_EQ(0, mt.get<int>()); 256 257 // EXPECT_TRUE(mt.hasDefaultValue());258 256 } 259 257 … … 287 285 EXPECT_EQ(Vector3::ZERO, mt.get<Vector3>()); 288 286 289 // EXPECT_TRUE(mt.hasDefaultValue());287 EXPECT_FALSE(mt.lastConversionSuccessful()); 290 288 } 291 289 … … 648 646 } 649 647 650 /////////////////////// 651 // hasDefaultValue() //652 /////////////////////// 653 TEST(MultiType, HasDefaultValue)648 //////////////////////////////// 649 // lastConversionSuccessful() // 650 //////////////////////////////// 651 TEST(MultiType, LastConversionSuccessful) 654 652 { 655 653 MultiType mt; 656 654 657 // EXPECT_FALSE(mt.hasDefaultValue());655 EXPECT_TRUE(mt.lastConversionSuccessful()); 658 656 659 657 mt = 5.55; 660 658 661 EXPECT_ FALSE(mt.hasDefaultValue());659 EXPECT_TRUE(mt.lastConversionSuccessful()); 662 660 663 661 mt.convert<int>(); 664 662 665 EXPECT_FALSE(mt.hasDefaultValue()); 666 667 mt.convert<Quaternion>(); 668 669 // EXPECT_TRUE(mt.hasDefaultValue()); 663 EXPECT_TRUE(mt.lastConversionSuccessful()); 664 665 mt.convert<Vector3>(); 666 667 EXPECT_FALSE(mt.lastConversionSuccessful()); 668 669 mt.convert<std::string>(); 670 671 EXPECT_TRUE(mt.lastConversionSuccessful()); 670 672 } 671 673
Note: See TracChangeset
for help on using the changeset viewer.