Commits

Matt Oswald committed 90c7e5b

fixes #8: correcting g++ compile errors

Comments (0)

Files changed (5)

     xUnit = SConscript('xUnit++/sconscript', exports = 'env')
     env['xUnit'] = xUnit
 
+    xUnitUtility = SConscript('xUnit++.Utility/sconscript', exports = 'env')
+    env['xUnitUtility'] = xUnitUtility
+
     console = SConscript('xUnit++.console/sconscript', exports = 'env')
     Depends(console, xUnit)
 

xUnit++.Utility/sconscript

+Import('env')
+
+targetFile = env['getTargetFile']('xUnit++.Utility', 'static')
+intDir = env['getIntDir']('xUnit++.Utility')
+
+local = env.Clone()
+local.VariantDir(intDir, './', duplicate = 0)
+local.Append(CPPPATH = ['../xUnit++'])
+
+target = local.StaticLibrary(targetFile, Glob(intDir + '*.cpp'))
+
+Return('target')

xUnit++.console/sconscript

 
 local = env.Clone()
 local.VariantDir(intDir, './', duplicate = 0)
-local.Append(CPPPATH = ['../xUnit++'])
+local.Append(CPPPATH = ['../xUnit++', '../xUnit++.Utility'])
 
-libs = env['xUnit']
+libs = [env['xUnitUtility'], env['xUnit']]
 
 if env['windows'] == False:
     libs = libs + [ 'dl', 'pthread' ]

xUnit++/xUnit++/TestCollection.h

 #include <deque>
 #include <vector>
 #include "xUnitTest.h"
+#include "xUnitToString.h"
 
 namespace xUnitpp
 {

xUnit++/xUnit++/xUnitAssert.h

     }
 
     template<typename TExpected, typename TActual>
-    xUnitFailure Equal(const TExpected &expectedBegin, const TExpected &expectedEnd, const TActual &actualBegin, const TActual &actualEnd, const LineInfo &lineInfo = LineInfo::empty()) const
+    xUnitFailure Equal(TExpected &&expectedBegin, TExpected &&expectedEnd, TActual &&actualBegin, TActual &&actualEnd, const LineInfo &lineInfo = LineInfo::empty()) const
     {
-        return Equal(expectedBegin, expectedEnd, actualBegin, actualEnd, [](decltype(*expectedBegin) a, decltype(*actualBegin) b) { return a == b; }, lineInfo);
+        return Equal(std::forward<TExpected>(expectedBegin), std::forward<TExpected>(expectedEnd), std::forward<TActual>(actualBegin), std::forward<TActual>(actualEnd), [](decltype(*expectedBegin) a, decltype(*actualBegin) b) { return a == b; }, lineInfo);
     }
 
     template<typename TExpected, typename TActual, typename TComparer>