#ifndef __COMPARETESTDATA_H__ #define __COMPARETESTDATA_H__ #include "MarshalSupport/MarshalSupport.pkg" #ifdef MARSHALSUPPORT_CPP11SUPPORTED using namespace MarshalSupport::Operators; #else using namespace MarshalSupport; #endif #include #include #include #include #include #include #include #include #ifdef MARSHALSUPPORT_CPP11SUPPORTED #include #include #include #include #endif #include "catch.hpp" template bool CompareTestData(const T& arg1, const T& arg2) { REQUIRE(arg1 == arg2); return (arg1 == arg2); } template bool CompareTestData(const std::priority_queue& arg1, const std::priority_queue& arg2) { std::priority_queue arg1Copy = arg1; std::priority_queue arg2Copy = arg2; bool result = true; while(!arg1Copy.empty() && !arg2Copy.empty()) { result &= (arg1Copy.top() == arg2Copy.top()); REQUIRE(arg1Copy.top() == arg2Copy.top()); arg1Copy.pop(); arg2Copy.pop(); } REQUIRE(arg1Copy.empty() == arg2Copy.empty()); return result && (arg1Copy.empty() == arg2Copy.empty()); } #endif