Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 19, 2012, 11:24:18 PM (12 years ago)
Author:
landauf
Message:

a lot of refactoring in the internals of MultiType
renamed set<T>() to force<T>() (forces the MultiType to switch its type to T)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/test/util/MultiTypeTest.cc

    r9224 r9225  
    1414    // x set(value)
    1515    // ? set(pointer)
    16     // x set<type>(value)
     16    // x force<type>(value)
    1717
    1818    // x convert<type>()
     
    203203
    204204    //////////////////////
    205     // set<type>(value) //
     205    // force<type>(value) //
    206206    //////////////////////
    207207    TEST(MultiType, SetValueWithTypeIntToString)
     
    212212        EXPECT_EQ("Hello", mt.get<std::string>());
    213213
    214         mt.set<int>(1234);
     214        mt.force<int>(1234);
    215215
    216216        EXPECT_TRUE(mt.isType<int>());
     
    225225        EXPECT_EQ("Hello", mt.get<std::string>());
    226226
    227         mt.set<int>("1234");
     227        mt.force<int>("1234");
    228228
    229229        EXPECT_TRUE(mt.isType<int>());
     
    238238        EXPECT_EQ(4321, mt.get<int>());
    239239
    240         mt.set<int>(1234);
     240        mt.force<int>(1234);
    241241
    242242        EXPECT_TRUE(mt.isType<int>());
Note: See TracChangeset for help on using the changeset viewer.