This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* usage: | |
* TestRunner tr; | |
* RUN_TEST(tr, FUNC_NAME); | |
* | |
*/ | |
template<class T, class U> | |
void AssertEqual(const T& t, const U& u, const string& hint = {}) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <chrono> | |
#include <iostream> | |
#include <string> | |
using namespace std::chrono; | |
class LogDuration { | |
public: | |
explicit LogDuration(const string& msg = "") | |
: message(msg + ": ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Iterator range | |
template <typename Iterator> | |
struct IteratorRange { | |
IteratorRange(Iterator First, Iterator Last) : first(First), last(Last) {} | |
Iterator first , last; | |
Iterator begin () const { | |
return first; | |
} | |
Iterator end () const { | |
return last;} |