#include "../include/iutest.hpp"
#if IUTEST_HAS_MATCHERS
#include <map>
namespace {
struct X { int a, b; X(int _a, int _b) : a(_a), b(_b) {} int GetA() const { return a; } };
int X2(int v) { return v * 2; }
float f0 = 0.0f;
double d0 = 0.0;
}
{
}
{
int* p1 = NULL;
int** p2 = &p1;
}
IUTEST(Matcher, FloatingPoint)
{
}
{
}
{
int a[2][3] ={ { 1, 2, 3 }, { 4, 5, 6 } };
int b[3] ={ 1, 2, 3 };
}
{
X x(0, 1);
::std::map<int, X> m;
for( int i=0; i < 10; ++i )
{
m.insert(::std::pair<int, X>(i, X(i, 100)));
}
}
{
}
{
}
{
}
{
int a[3] ={ 0, 1, 3 };
int b[3] ={ 0, 1, 3 };
}
#if IUTEST_HAS_MATCHER_ELEMENTSARE
{
int a[3] ={ 0, -1, 3 };
}
#endif
#if IUTEST_HAS_MATCHER_ALLOF_AND_ANYOF
{
int a[3] ={ 0, 1, 3 };
}
{
int a[3] ={ 0, -1, 10 };
}
#endif
#endif
detail::StartsWithMatcher< const T & > StartsWith(const T &str)
Make StartsWith matcher
Definition: iutest_matcher.hpp:2212
iutest matchers namespace
Definition: iutest_matcher.hpp:1838
detail::NanSensitiveFloatingPointEqMatcher< double > NanSensitiveDoubleEq(double expected)
Make NanSensitive Double Eq matcher
Definition: iutest_matcher.hpp:2063
detail::EqMatcher< T > Eq(const T &expected)
Make Eq matcher
Definition: iutest_matcher.hpp:1862
detail::StrNeMatcher< T > StrNe(const T &expected)
Make StrNe matcher
Definition: iutest_matcher.hpp:2182
detail::FloatingPointEqMatcher< float > FloatEq(float expected)
Make Float Eq matcher
Definition: iutest_matcher.hpp:2013
detail::ResultOfMatcher< F, T > ResultOf(const F &func, const T &expected)
Make ResultOf matcher
Definition: iutest_matcher.hpp:2501
detail::GeMatcher< T > Ge(const T &expected)
Make Ge matcher
Definition: iutest_matcher.hpp:1902
detail::NotMatcher< T > Not(const T &unexpected)
Make Not matcher
Definition: iutest_matcher.hpp:2519
detail::LeMatcher< T > Le(const T &expected)
Make Le matcher
Definition: iutest_matcher.hpp:1882
detail::NanSensitiveFloatingPointEqMatcher< float > NanSensitiveFloatEq(float expected)
Make NanSensitive Float Eq matcher
Definition: iutest_matcher.hpp:2054
detail::KeyMatcher< T > Key(const T &expected)
Make Key matcher
Definition: iutest_matcher.hpp:2461
detail::NotNullMatcher NotNull()
Make NotNull matcher
Definition: iutest_matcher.hpp:1984
detail::GtMatcher< T > Gt(const T &expected)
Make Gt matcher
Definition: iutest_matcher.hpp:1912
detail::AnyOfMatcher< T... > AnyOf(const T &... m)
Make AnyOf matcher
Definition: iutest_matcher.hpp:2578
detail::ContainsMatcher< T > Contains(const T &expected)
Make Contains matcher
Definition: iutest_matcher.hpp:2242
#define IUTEST_EXPECT_THAT(actual, matcher)
matcher テスト
Definition: iutest.hpp:669
detail::PropertyMatcher< P, T > Property(const P &prop, const T &expected)
Make Property matcher
Definition: iutest_matcher.hpp:2491
detail::EndsWithMatcher< const T & > EndsWith(const T &str)
Make EndsWith matcher
Definition: iutest_matcher.hpp:2232
detail::HasSubstrMatcher< const T & > HasSubstr(const T &str)
Make HasSubstr matcher
Definition: iutest_matcher.hpp:2222
const detail::AnythingMatcher _
Anything matcher
Definition: iutest_matcher.hpp:2537
detail::FloatingPointEqMatcher< double > DoubleEq(double expected)
Make Double Eq matcher
Definition: iutest_matcher.hpp:2022
detail::AllOfMatcher< T... > AllOf(const T &... m)
Make AllOf matcher
Definition: iutest_matcher.hpp:2568
detail::ElementsAreArrayMatcher< typename Container::value_type > ElementsAreArray(const Container &container)
Make ElementsAreArray matcher
Definition: iutest_matcher.hpp:2319
detail::FieldMatcher< F, T > Field(const F &field, const T &expected)
Make Field matcher
Definition: iutest_matcher.hpp:2481
detail::ElementsAreMatcher< T... > ElementsAre(const T &... m)
Make ElementsAre matcher
Definition: iutest_matcher.hpp:2423
detail::StrCaseEqMatcher< T > StrCaseEq(const T &expected)
Make StrCaseEq matcher
Definition: iutest_matcher.hpp:2192
detail::StrEqMatcher< T > StrEq(const T &expected)
Make StrEq matcher
Definition: iutest_matcher.hpp:2172
detail::PairMatcher< T1, T2 > Pair(const T1 &m1, const T2 &m2)
Make Pair matcher
Definition: iutest_matcher.hpp:2471
#define IUTEST(testcase_, testname_)
テスト関数定義マクロ
Definition: iutest.hpp:66
detail::EachMatcher< T > Each(const T &expected)
Make Each matcher
Definition: iutest_matcher.hpp:2254
detail::IsNullMatcher IsNull()
Make IsNull matcher
Definition: iutest_matcher.hpp:1975
detail::PointeeMatcher< T > Pointee(const T &expected)
Make Pointee matcher
Definition: iutest_matcher.hpp:2510
detail::NeMatcher< T > Ne(const T &expected)
Make Ne matcher
Definition: iutest_matcher.hpp:1872
detail::LtMatcher< T > Lt(const T &expected)
Make Lt matcher
Definition: iutest_matcher.hpp:1892
detail::StrCaseNeMatcher< T > StrCaseNe(const T &expected)
Make StrCaseNe matcher
Definition: iutest_matcher.hpp:2202