Navigation Menu

Skip to content

Commit

Permalink
Merge pull request #58 from yumetodo/fix/avoid_deprecated_special_fun…
Browse files Browse the repository at this point in the history
…ction_call

fix: avoid deprecated special function call
  • Loading branch information
srz-zumix committed May 31, 2018
2 parents 69bdc23 + a83fdea commit d4e68d9
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
5 changes: 5 additions & 0 deletions include/internal/iutest_list.hpp
Expand Up @@ -67,6 +67,11 @@ class iu_list_iterator
public:
iu_list_iterator(value_ptr p=NULL) IUTEST_CXX_NOEXCEPT_SPEC : m_node(p) {} // NOLINT
iu_list_iterator(const iu_list_iterator& rhs) IUTEST_CXX_NOEXCEPT_SPEC : m_node(rhs.m_node) {}
iu_list_iterator& operator = (const iu_list_iterator& rhs) IUTEST_CXX_NOEXCEPT_SPEC
{
m_node = rhs.m_node;
return *this;
}

public:
bool operator == (const _Myt& it) const { return this->m_node == it.m_node; }
Expand Down
1 change: 1 addition & 0 deletions include/internal/iutest_regex.hpp
Expand Up @@ -46,6 +46,7 @@ class iuRegex
public:
iuRegex(const char* pattern) { Init(pattern); } // NOLINT
iuRegex(const ::std::string& pattern) { Init(pattern.c_str()); } // NOLINT
iuRegex(const iuRegex & rhs) : m_re(rhs.m_re), m_pattern(rhs.m_pattern) {}
public:
bool FullMatch(const char* str) const;
bool PartialMatch(const char* str) const;
Expand Down
8 changes: 7 additions & 1 deletion include/iutest_matcher.hpp
Expand Up @@ -65,6 +65,8 @@ class IMatcher
template<typename T>
struct is_matcher : public iutest_type_traits::is_base_of<IMatcher, T> {};
public:
// IMatcher(const IMatcher &) {}
IMatcher& operator = (const IMatcher&) { return *this; }
virtual ~IMatcher() {}
virtual ::std::string WhichIs() const = 0;
};
Expand All @@ -82,6 +84,7 @@ inline iu_ostream& operator << (iu_ostream& os, const IMatcher& msg)
#define DECL_COMPARE_MATCHER(name, op) \
template<typename T>class IUTEST_PP_CAT(name, Matcher): public IMatcher{ \
public: explicit IUTEST_PP_CAT(name, Matcher)(const T& v) : m_expected(v) {}\
IUTEST_PP_CAT(name, Matcher)(const IUTEST_PP_CAT(name, Matcher) & rhs) : m_expected(rhs.m_expected) {}\
::std::string WhichIs() const IUTEST_CXX_OVERRIDE { \
iu_global_format_stringstream strm; \
strm << #name ": " << m_expected; return strm.str(); \
Expand All @@ -97,6 +100,7 @@ inline iu_ostream& operator << (iu_ostream& os, const IMatcher& msg)
#define DECL_COMPARE_MATCHER2(name, op) \
class IUTEST_PP_CAT(Twofold, IUTEST_PP_CAT(name, Matcher)): public IMatcher{ \
public: IUTEST_PP_CAT(Twofold, IUTEST_PP_CAT(name, Matcher))() {} \
IUTEST_PP_CAT(Twofold, IUTEST_PP_CAT(name, Matcher))(const IUTEST_PP_CAT(Twofold, IUTEST_PP_CAT(name, Matcher)) &) {}\
::std::string WhichIs() const IUTEST_CXX_OVERRIDE { return #name; } \
template<typename T, typename U>AssertionResult operator () \
(const T& actual, const U& expected) const { \
Expand Down Expand Up @@ -332,7 +336,7 @@ class HasSubstrMatcher : public IMatcher
{
public:
explicit HasSubstrMatcher(T expected) : m_expected(expected) {}

HasSubstrMatcher(const HasSubstrMatcher & rhs) : m_expected(rhs.m_expected) {}
public:
template<typename U>
AssertionResult operator ()(const U& actual) const
Expand Down Expand Up @@ -1453,6 +1457,7 @@ class AnyMatcher : public IMatcher
{
public:
AnyMatcher() {}
AnyMatcher(const AnyMatcher &) {}
public:
AssertionResult operator ()(const T&) const
{
Expand All @@ -1479,6 +1484,7 @@ class AnythingMatcher : public IMatcher
{
public:
AnythingMatcher() {}
AnythingMatcher(const AnythingMatcher &) {}
public:
template<typename U>
AssertionResult operator ()(const U&) const
Expand Down

0 comments on commit d4e68d9

Please sign in to comment.