From ba2b0276784bfa44dadf65ca08cb196a9e94a249 Mon Sep 17 00:00:00 2001
From: Jan Travnicek <Jan.Travnicek@fit.cvut.cz>
Date: Tue, 13 Sep 2016 11:12:03 +0200
Subject: [PATCH] fix set std tests

---
 alib2std/src/extensions/set.hpp          | 2 +-
 alib2std/test-src/extensions/SetTest.cpp | 8 ++++----
 alib2std/test-src/extensions/SetTest.h   | 1 +
 3 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/alib2std/src/extensions/set.hpp b/alib2std/src/extensions/set.hpp
index ab34e6d25e..3435451247 100644
--- a/alib2std/src/extensions/set.hpp
+++ b/alib2std/src/extensions/set.hpp
@@ -1,5 +1,5 @@
 /*
- * std.hpp
+ * set.hpp
  *
  * Created on: Apr 1, 2013
  * Author: Jan Travnicek
diff --git a/alib2std/test-src/extensions/SetTest.cpp b/alib2std/test-src/extensions/SetTest.cpp
index eb91b100e8..af5be8775a 100644
--- a/alib2std/test-src/extensions/SetTest.cpp
+++ b/alib2std/test-src/extensions/SetTest.cpp
@@ -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);
 }
 
diff --git a/alib2std/test-src/extensions/SetTest.h b/alib2std/test-src/extensions/SetTest.h
index 91091fa046..a54c3e4861 100644
--- a/alib2std/test-src/extensions/SetTest.h
+++ b/alib2std/test-src/extensions/SetTest.h
@@ -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:
-- 
GitLab