Commits

Matt Oswald committed ec51eb8

fixing compile errors under g++ (ubuntu)

  • Participants
  • Parent commits 0bfe841
  • Tags 1.3.0

Comments (0)

Files changed (6)

File .build/build.sconscript

 else:
     env.Append(CCFLAGS = [ '-pthread', '-fPIC', '-Wall', '-Wextra', '-pedantic', '-std=c++11' ])
     env.Append(CCFLAGS = [ '-Wno-comment' ])
+    env.Append(CPPDEFINES = [ '__stdcall=' ])

File xUnit++.Utility/XmlReporter.h

 public:
     XmlReporter(const std::string &filename);
 
-    virtual void _stdcall ReportStart(const ITestDetails &td) override;
-    virtual void _stdcall ReportEvent(const ITestDetails &testDetails, const ITestEvent &evt) override;
-    virtual void _stdcall ReportSkip(const ITestDetails &testDetails, const char *reason) override;
-    virtual void _stdcall ReportFinish(const ITestDetails &testDetails, long long nsTaken) override;
-    virtual void _stdcall ReportAllTestsComplete(size_t testCount, size_t skipped, size_t failureCount, long long nsTotal) override;
+    virtual void __stdcall ReportStart(const ITestDetails &td) override;
+    virtual void __stdcall ReportEvent(const ITestDetails &testDetails, const ITestEvent &evt) override;
+    virtual void __stdcall ReportSkip(const ITestDetails &testDetails, const char *reason) override;
+    virtual void __stdcall ReportFinish(const ITestDetails &testDetails, long long nsTaken) override;
+    virtual void __stdcall ReportAllTestsComplete(size_t testCount, size_t skipped, size_t failureCount, long long nsTotal) override;
 
 public:
     struct SuiteResult;

File xUnit++.console/main.cpp

                     {
                         std::regex regex(suite, std::regex_constants::icase);
 
-                        std::string suite = td.GetSuite() == nullptr ? "" : td.GetSuite();
-                        if (std::regex_search(suite, regex))
+                        std::string testSuite = td.GetSuite() == nullptr ? "" : td.GetSuite();
+                        if (std::regex_search(testSuite, regex))
                         {
                             included = true;
                             break;

File xUnit++/xUnit++/IOutput.h

     virtual void __stdcall ReportEvent(const ITestDetails &testDetails, const ITestEvent &evt) = 0;
     virtual void __stdcall ReportSkip(const ITestDetails &testDetails, const char *reason) = 0;
     virtual void __stdcall ReportFinish(const ITestDetails &testDetails, long long ns) = 0;
-    virtual void __stdcall ReportAllTestsComplete(size_t testCount, size_t skipped, size_t failed, long long nsTotal) = 0; 
+    virtual void __stdcall ReportAllTestsComplete(size_t testCount, size_t skipped, size_t failed, long long nsTotal) = 0;
 };
 
 }

File xUnit++/xUnit++/xUnitLog.h

         public:
             Message(std::function<void(const std::string &, const LineInfo &)> recordMessage, const LineInfo &lineInfo = LineInfo());
             Message(const Message &other);
-
+// !!!g++ why does `= default` cause xUnitLog.cpp to fail to compile?
+/*
 #if !defined(_MSC_VER) // !!!VS remove the #if/#endif when VS can compile this code
             Message(Message &&) = default;
 #endif
+*/
 
             ~Message();
 

File xUnit++/xUnit++/xUnitTest.h

         const std::string &suite, AttributeCollection &&attributes, Time::Duration timeLimit,
         std::string &&filename, int line, const std::vector<std::shared_ptr<TestEventRecorder>> &testEventRecorders);
 
-    const TestDetails &TestDetails() const;
+    const xUnitpp::TestDetails &TestDetails() const;
 
     TestResult Run();
     Time::Duration Duration() const;