Commits

Matt Oswald committed 9d49fdd

fixing ubuntu build

Comments (0)

Files changed (5)

src/TestEvent.cpp

-#include "TestEvent.h"
-#include "xUnitAssert.h"
-
-namespace xUnitpp
-{
-
-const std::string &to_string(EventLevel level)
-{
-    static std::string msg[] =
-    {
-        "DEBUG",
-        "info",
-        "warning",
-        "error",
-        "error",
-        "error"
-    };
-
-    return msg[(int)level];
-}
-
-const std::string &to_string(const TestEvent &evt)
-{
-    return evt.message;
-}
-
-TestEvent::TestEvent(EventLevel level, const std::string &message, const xUnitpp::LineInfo &lineInfo)
-    : level(level)
-    , message(message)
-    , lineInfo(lineInfo)
-{
-}
-
-TestEvent::TestEvent(EventLevel level, const xUnitAssert &assert)
-    : level(level)
-    , message(assert.what())
-    , lineInfo(assert.LineInfo())
-{
-}
-
-TestEvent::TestEvent(const std::exception &e)
-    : level(EventLevel::Fatal)
-    , message(e.what())
-    , lineInfo(LineInfo::empty())
-{
-}
-
-bool TestEvent::IsFailure() const
-{
-    return level > EventLevel::Warning;
-}
-
-EventLevel TestEvent::Level() const
-{
-    return level;
-}
-
-const xUnitpp::LineInfo &TestEvent::LineInfo() const
-{
-    return lineInfo;
-}
-
-}

xUnit++/src/TestEvent.cpp

+#include "TestEvent.h"
+#include "xUnitAssert.h"
+
+namespace xUnitpp
+{
+
+const std::string &to_string(EventLevel level)
+{
+    static std::string msg[] =
+    {
+        "DEBUG",
+        "info",
+        "warning",
+        "error",
+        "error",
+        "error"
+    };
+
+    return msg[(int)level];
+}
+
+const std::string &to_string(const TestEvent &evt)
+{
+    return evt.message;
+}
+
+TestEvent::TestEvent(EventLevel level, const std::string &message, const xUnitpp::LineInfo &lineInfo)
+    : level(level)
+    , message(message)
+    , lineInfo(lineInfo)
+{
+}
+
+TestEvent::TestEvent(EventLevel level, const xUnitAssert &assert)
+    : level(level)
+    , message(assert.what())
+    , lineInfo(assert.LineInfo())
+{
+}
+
+TestEvent::TestEvent(const std::exception &e)
+    : level(EventLevel::Fatal)
+    , message(e.what())
+    , lineInfo(LineInfo::empty())
+{
+}
+
+bool TestEvent::IsFailure() const
+{
+    return level > EventLevel::Warning;
+}
+
+EventLevel TestEvent::Level() const
+{
+    return level;
+}
+
+const xUnitpp::LineInfo &TestEvent::LineInfo() const
+{
+    return lineInfo;
+}
+
+}

xUnit++/src/xUnitTest.cpp

                      const std::string &filename, int line, const std::vector<std::shared_ptr<TestEventRecorder>> &testEventRecorders)
     : test(test)
     , testDetails(name, suite, attributes, timeLimit, filename, line)
+    , testEventRecorders(testEventRecorders)
     , failureEventLogged(false)
-    , testEventRecorders(testEventRecorders)
 {
 }
 

xUnit++/xUnit++.vcxproj

     </ProjectConfiguration>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="..\src\TestEvent.cpp" />
+    <ClCompile Include="src/TestEvent.cpp" />
     <ClCompile Include="src/IOutput.cpp" />
     <ClCompile Include="src/LineInfo.cpp" />
     <ClCompile Include="src/TestCollection.cpp" />
     <ClCompile Include="src/xUnitAssert.cpp" />
     <ClCompile Include="src/xUnitTest.cpp" />
     <ClCompile Include="src/xUnitTestRunner.cpp" />
-    <ClCompile Include="src\TestEventRecorder.cpp" />
+    <ClCompile Include="src/TestEventRecorder.cpp" />
     <ClCompile Include="src/xUnitCheck.cpp" />
-    <ClCompile Include="src\xUnitLog.cpp" />
-    <ClCompile Include="src\xUnitWarn.cpp" />
+    <ClCompile Include="src/xUnitLog.cpp" />
+    <ClCompile Include="src/xUnitWarn.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="xUnit++/Attributes.h" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
+</Project>

xUnit++/xUnit++.vcxproj.filters

     <ClCompile Include="src/xUnitTest.cpp" />
     <ClCompile Include="src/IOutput.cpp" />
     <ClCompile Include="src/xUnitCheck.cpp" />
-    <ClCompile Include="..\src\TestEvent.cpp" />
-    <ClCompile Include="src\xUnitWarn.cpp" />
-    <ClCompile Include="src\TestEventRecorder.cpp" />
-    <ClCompile Include="src\xUnitLog.cpp" />
+    <ClCompile Include="src/TestEvent.cpp" />
+    <ClCompile Include="src/xUnitWarn.cpp" />
+    <ClCompile Include="src/TestEventRecorder.cpp" />
+    <ClCompile Include="src/xUnitLog.cpp" />
   </ItemGroup>
   <ItemGroup>
     <ClInclude Include="xUnit++/xUnitAssert.h" />
     <ClInclude Include="xUnit++\TestEventRecorder.h" />
     <ClInclude Include="xUnit++\xUnitLog.h" />
   </ItemGroup>
-</Project>
+</Project>