-
Jan Trávníček authoredJan Trávníček authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
SetTest.h 783 B
#ifndef SET_TEST_H_
#define SET_TEST_H_
#include <cppunit/extensions/HelperMacros.h>
class SetTest : public CppUnit::TestFixture
{
CPPUNIT_TEST_SUITE( SetTest );
CPPUNIT_TEST( test1 );
CPPUNIT_TEST( test2 );
CPPUNIT_TEST( test3 );
CPPUNIT_TEST_SUITE_END();
public:
class Moveable {
int& moves;
int& copies;
public:
Moveable(int& moves, int& copies) : moves(moves), copies(copies) {
moves = 0;
copies = 0;
}
Moveable(const Moveable& src) : moves(src.moves), copies(src.copies) {
copies++;
}
Moveable(Moveable&& src) : moves(src.moves), copies(src.copies) {
moves++;
}
bool operator<(const Moveable&) const {
return false;
}
};
public:
void setUp();
void tearDown();
void test1();
void test2();
void test3();
};
#endif // SET_TEST_H_