Skip to content
Snippets Groups Projects
Commit ba2b0276 authored by Jan Trávníček's avatar Jan Trávníček
Browse files

fix set std tests

parent 320b7460
No related branches found
No related tags found
No related merge requests found
/*
* std.hpp
* set.hpp
*
* Created on: Apr 1, 2013
* Author: Jan Travnicek
......
......@@ -30,8 +30,8 @@ void SetTest::test1() {
 
 
void SetTest::test2() {
std::set<int> first = {1};
std::set<int> second = {1, 2, 3};
std::set<int> first = {1};
std::set<int> second = {1, 2, 3};
 
std::set<int> firstMinusSecond;
std::set<int> secondMinusFirst;
......@@ -47,7 +47,8 @@ void SetTest::test3() {
int moves;
int copies;
 
std::set<SetTest::Moveable> set = {SetTest::Moveable(moves, copies)};
std::set<SetTest::Moveable> set;
set.insert ( SetTest::Moveable(moves, copies) );
std::set<SetTest::Moveable> set2;
 
for(Moveable moveable : std::make_moveable_set(set)) {
......@@ -55,6 +56,5 @@ void SetTest::test3() {
}
 
CPPUNIT_ASSERT(copies == 0);
CPPUNIT_ASSERT(copies == 2);
}
 
......@@ -8,6 +8,7 @@ class SetTest : public CppUnit::TestFixture
CPPUNIT_TEST_SUITE( SetTest );
CPPUNIT_TEST( test1 );
CPPUNIT_TEST( test2 );
CPPUNIT_TEST( test3 );
CPPUNIT_TEST_SUITE_END();
 
public:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment