From d8aa843c7d5244b90761c52eb61dc3838df1b4f1 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Fri, 12 Nov 2010 19:32:13 +0000 Subject: [PATCH] Added Visual Studio project and fixed up some warnings showing in VS --- .gitignore | 5 + Test/{main.cpp => TestMain.cpp} | 2 +- Test/VisualStudio/TestCatch/TestCatch.sln | 20 ++ .../TestCatch/TestCatch/ReadMe.txt | 33 +++ .../TestCatch/TestCatch/TestCatch.cpp | 8 + .../TestCatch/TestCatch/TestCatch.vcproj | 221 ++++++++++++++++++ catch_reporter_xml.hpp | 2 +- catch_runner.hpp | 2 +- internal/catch_capture.hpp | 2 +- internal/catch_commandline.hpp | 2 +- internal/catch_common.h | 11 + internal/catch_reporter_registry.hpp | 2 +- internal/catch_runner_impl.hpp | 4 +- internal/catch_section.hpp | 2 +- 14 files changed, 307 insertions(+), 9 deletions(-) rename Test/{main.cpp => TestMain.cpp} (93%) create mode 100644 Test/VisualStudio/TestCatch/TestCatch.sln create mode 100644 Test/VisualStudio/TestCatch/TestCatch/ReadMe.txt create mode 100644 Test/VisualStudio/TestCatch/TestCatch/TestCatch.cpp create mode 100644 Test/VisualStudio/TestCatch/TestCatch/TestCatch.vcproj diff --git a/.gitignore b/.gitignore index d3a1e133..35fc7a6e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,8 @@ Test/build *.pbxuser *.mode1v3 +*.ncb +*.suo +Debug +Release +*.user \ No newline at end of file diff --git a/Test/main.cpp b/Test/TestMain.cpp similarity index 93% rename from Test/main.cpp rename to Test/TestMain.cpp index 2a577905..98f85160 100644 --- a/Test/main.cpp +++ b/Test/TestMain.cpp @@ -59,7 +59,7 @@ int main (int argc, char * const argv[]) if( result == 0 ) { - std::cout << "All tests completed successfully" << std::endl; + std::cout << "All " << runner.getSuccessCount() + runner.getFailureCount() << " tests completed successfully" << std::endl; } return result; } diff --git a/Test/VisualStudio/TestCatch/TestCatch.sln b/Test/VisualStudio/TestCatch/TestCatch.sln new file mode 100644 index 00000000..d6120f4e --- /dev/null +++ b/Test/VisualStudio/TestCatch/TestCatch.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 10.00 +# Visual Studio 2008 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestCatch", "TestCatch\TestCatch.vcproj", "{A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Win32 = Debug|Win32 + Release|Win32 = Release|Win32 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Debug|Win32.ActiveCfg = Debug|Win32 + {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Debug|Win32.Build.0 = Debug|Win32 + {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Release|Win32.ActiveCfg = Release|Win32 + {A2F23B19-9CF7-4246-AE58-BC65E39C6F7E}.Release|Win32.Build.0 = Release|Win32 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/Test/VisualStudio/TestCatch/TestCatch/ReadMe.txt b/Test/VisualStudio/TestCatch/TestCatch/ReadMe.txt new file mode 100644 index 00000000..597d267b --- /dev/null +++ b/Test/VisualStudio/TestCatch/TestCatch/ReadMe.txt @@ -0,0 +1,33 @@ +======================================================================== + CONSOLE APPLICATION : TestCatch Project Overview +======================================================================== + +AppWizard has created this TestCatch application for you. + +This file contains a summary of what you will find in each of the files that +make up your TestCatch application. + + +TestCatch.vcproj + This is the main project file for VC++ projects generated using an Application Wizard. + It contains information about the version of Visual C++ that generated the file, and + information about the platforms, configurations, and project features selected with the + Application Wizard. + +TestCatch.cpp + This is the main application source file. + +///////////////////////////////////////////////////////////////////////////// +Other standard files: + +StdAfx.h, StdAfx.cpp + These files are used to build a precompiled header (PCH) file + named TestCatch.pch and a precompiled types file named StdAfx.obj. + +///////////////////////////////////////////////////////////////////////////// +Other notes: + +AppWizard uses "TODO:" comments to indicate parts of the source code you +should add to or customize. + +///////////////////////////////////////////////////////////////////////////// diff --git a/Test/VisualStudio/TestCatch/TestCatch/TestCatch.cpp b/Test/VisualStudio/TestCatch/TestCatch/TestCatch.cpp new file mode 100644 index 00000000..c2fa801e --- /dev/null +++ b/Test/VisualStudio/TestCatch/TestCatch/TestCatch.cpp @@ -0,0 +1,8 @@ +// TestCatch.cpp : Defines the entry point for the console application. +// + +int main(int argc, char* argv[]) +{ + return 0; +} + diff --git a/Test/VisualStudio/TestCatch/TestCatch/TestCatch.vcproj b/Test/VisualStudio/TestCatch/TestCatch/TestCatch.vcproj new file mode 100644 index 00000000..854685d7 --- /dev/null +++ b/Test/VisualStudio/TestCatch/TestCatch/TestCatch.vcproj @@ -0,0 +1,221 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/catch_reporter_xml.hpp b/catch_reporter_xml.hpp index 34dd863f..ce6f76a0 100644 --- a/catch_reporter_xml.hpp +++ b/catch_reporter_xml.hpp @@ -82,7 +82,7 @@ namespace Catch } /////////////////////////////////////////////////////////////////////////// - virtual void EndTestCase( const Catch::TestCaseInfo& testInfo ) + virtual void EndTestCase( const Catch::TestCaseInfo& ) { m_config.stream() << "\t