Changeset 9223 for code/branches/testing/test
- Timestamp:
- May 19, 2012, 11:35:32 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/testing/test/util/MultiTypeTest.cc
r9221 r9223 18 18 // x convert<type>() 19 19 // x reset 20 // x reset<type>() 20 21 // x resetValue 21 // x setType<type>()22 22 23 23 // x isType<type>() … … 310 310 } 311 311 312 /////////////////// 313 // reset<type>() // 314 /////////////////// 315 TEST(MultiType, SetType) 316 { 317 MultiType mt(10); 318 319 EXPECT_TRUE(mt.isType<int>()); 320 EXPECT_FALSE(mt.isType<float>()); 321 EXPECT_EQ(10, mt.getInt()); 322 323 mt.reset<float>(); 324 325 EXPECT_FALSE(mt.isType<int>()); 326 EXPECT_TRUE(mt.isType<float>()); 327 EXPECT_EQ(0, mt.getInt()); 328 } 329 312 330 //////////////// 313 331 // resetValue // … … 323 341 324 342 EXPECT_TRUE(mt.isType<int>()); 325 EXPECT_EQ(0, mt.getInt());326 }327 328 /////////////////////329 // setType<type>() //330 /////////////////////331 TEST(MultiType, SetType)332 {333 MultiType mt(10);334 335 EXPECT_TRUE(mt.isType<int>());336 EXPECT_FALSE(mt.isType<float>());337 EXPECT_EQ(10, mt.getInt());338 339 mt.setType<float>();340 341 EXPECT_FALSE(mt.isType<int>());342 EXPECT_TRUE(mt.isType<float>());343 343 EXPECT_EQ(0, mt.getInt()); 344 344 }
Note: See TracChangeset
for help on using the changeset viewer.