Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 9221 for code/branches/testing


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

added tests for MultiType
added isType<void>() which is equivalent to null()

Location:
code/branches/testing
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • code/branches/testing/src/libraries/util/MultiType.h

    r8858 r9221  
    501501    _UtilExport inline std::ostream& operator<<(std::ostream& outstream, const MultiType& mt) { if (mt.value_) { mt.value_->toString(outstream); } return outstream; }
    502502
     503    template <> inline bool MultiType::isType<void>()                 const { return this->null();                                                       } ///< Returns true if the current type equals the given type.
    503504    template <> inline bool MultiType::isType<char>()                 const { return (this->value_ && this->value_->type_ == MT_Type::Char);             } ///< Returns true if the current type equals the given type.
    504505    template <> inline bool MultiType::isType<unsigned char>()        const { return (this->value_ && this->value_->type_ == MT_Type::UnsignedChar);     } ///< Returns true if the current type equals the given type.
  • code/branches/testing/test/util/CMakeLists.txt

    r9114 r9221  
    66    MathTest.cc
    77    mboolTest.cc
     8    MultiTypeTest.cc
    89    ScopeTest.cc
    910    SharedPtrTest.cc
Note: See TracChangeset for help on using the changeset viewer.