Add support for Managed tests in VS2010 & VS2012. Add support for Native tests in VS2012

This commit is contained in:
Malcolm Noyes 2013-11-17 14:18:02 +00:00
parent 3a6ab65c82
commit 907f514de7
42 changed files with 3129 additions and 814 deletions

4
.gitignore vendored
View File

@ -3,9 +3,12 @@
*.mode1v3
*.ncb
*.sdf
*.opensdf
*.suo
Debug
Release
ipch
TestResults
*.user
*.xcuserstate
*.o
@ -14,7 +17,6 @@ xcuserdata
CatchSelfTest.xcscheme
Breakpoints.xcbkptlist
projects/VS2010/TestCatch/_UpgradeReport_Files/
projects/VS2010/TestCatch/TestCatch/TestCatch.vcxproj.filters
projects/VisualStudio/TestCatch/UpgradeLog.XML
UpgradeLog.XML
projects/XCode4/iOSTest/Build/Intermediates/PrecompiledHeaders

View File

@ -16,7 +16,7 @@
#include "catch_context.h"
#include "catch_common.h"
#include "catch_tostring.hpp"
#include "catch_interfaces_registry_hub.h"
#include "catch_interfaces_reporter.h"
#include "internal/catch_compiler_capabilities.h"
#include <ostream>
@ -56,19 +56,70 @@ namespace Catch {
.setResultType( matcher.match( arg ) );
}
#if defined(INTERNAL_CATCH_VS_MANAGED)
// TestFailureException not defined for CLR
#else // detect CLR
struct TestFailureException{};
#endif
} // end namespace Catch
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_ASSERTIONINFO_NAME INTERNAL_CATCH_UNIQUE_NAME( __assertionInfo )
#if !defined(INTERNAL_CATCH_VS_MANAGED) && !defined(INTERNAL_CATCH_VS_NATIVE)
// normal Catch
#define INTERNAL_CATCH_TEST_FAILURE_EXCEPTION const Catch::TestFailureException&
#define INTERNAL_CATCH_TEST_THROW_FAILURE throw Catch::TestFailureException();
#else // VS integration
#if defined(INTERNAL_CATCH_VS_MANAGED)
#define INTERNAL_CATCH_TEST_THROW_FAILURE \
{ \
Catch::IResultCapture& cap = Catch::getResultCapture(); \
const Catch::AssertionResult* r = cap.getLastResult(); \
std::stringstream _sf; \
_sf << r->getExpressionInMacro().c_str() << ", " << r->getMessage().c_str(); \
std::string fail = _sf.str(); \
Assert::Fail(Catch::convert_string_to_managed(fail)); \
}
#define INTERNAL_CATCH_TEST_FAILURE_EXCEPTION AssertFailedException^
#else
#if defined(INTERNAL_CATCH_VS_NATIVE)
#define INTERNAL_CATCH_TEST_THROW_FAILURE \
{ \
Catch::IResultCapture& cap = Catch::getResultCapture(); \
const Catch::AssertionResult* r = cap.getLastResult(); \
std::wstringstream _s; \
_s << r->getSourceInfo().file.c_str(); \
std::wstring ws = _s.str(); \
std::string testName = cap.getCurrentTestName(); \
__LineInfo li(ws.c_str(), testName.c_str(), r->getSourceInfo().line); \
std::wstringstream _sf; \
_sf << r->getExpandedExpression().c_str() << ", " << r->getMessage().c_str(); \
std::wstring ws2 = _sf.str(); \
Assert::Fail(ws2.c_str(), &li); \
}
#define INTERNAL_CATCH_TEST_FAILURE_EXCEPTION const Catch::TestFailureException&
#endif // INTERNAL_CATCH_VS_MANAGED
#endif // detect CLR
#endif // VS integration
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_ACCEPT_EXPR( evaluatedExpr, resultDisposition, originalExpr ) \
if( Catch::ResultAction::Value internal_catch_action = Catch::getResultCapture().acceptExpression( evaluatedExpr, INTERNAL_CATCH_ASSERTIONINFO_NAME ) ) { \
if( internal_catch_action & Catch::ResultAction::Debug ) BreakIntoDebugger(); \
if( internal_catch_action & Catch::ResultAction::Abort ) throw Catch::TestFailureException(); \
if( !Catch::shouldContinueOnFailure( resultDisposition ) ) throw Catch::TestFailureException(); \
if( internal_catch_action & Catch::ResultAction::Abort ) { INTERNAL_CATCH_TEST_THROW_FAILURE } \
if( !Catch::shouldContinueOnFailure( resultDisposition ) ) { INTERNAL_CATCH_TEST_THROW_FAILURE } \
Catch::isTrue( false && originalExpr ); \
}
@ -82,7 +133,7 @@ struct TestFailureException{};
INTERNAL_CATCH_ACCEPT_INFO( #expr, macroName, resultDisposition ); \
try { \
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionDecomposer()->*expr ).endExpression( resultDisposition ), resultDisposition, expr ); \
} catch( Catch::TestFailureException& ) { \
} catch( INTERNAL_CATCH_TEST_FAILURE_EXCEPTION ) { \
throw; \
} catch( ... ) { \
INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( Catch::ResultWas::ThrewException ) << Catch::translateActiveException(), \
@ -121,7 +172,7 @@ struct TestFailureException{};
INTERNAL_CATCH_ACCEPT_EXPR( Catch::ExpressionResultBuilder( Catch::ResultWas::DidntThrowException ), resultDisposition, false ); \
} \
} \
catch( Catch::TestFailureException& ) { \
catch( INTERNAL_CATCH_TEST_FAILURE_EXCEPTION ) { \
throw; \
} \
catch( exceptionType ) { \
@ -165,7 +216,7 @@ struct TestFailureException{};
INTERNAL_CATCH_ACCEPT_INFO( #arg " " #matcher, macroName, resultDisposition ); \
try { \
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::expressionResultBuilderFromMatcher( ::Catch::Matchers::matcher, arg, #matcher ) ), resultDisposition, false ); \
} catch( Catch::TestFailureException& ) { \
} catch( INTERNAL_CATCH_TEST_FAILURE_EXCEPTION ) { \
throw; \
} catch( ... ) { \
INTERNAL_CATCH_ACCEPT_EXPR( ( Catch::ExpressionResultBuilder( Catch::ResultWas::ThrewException ) << Catch::translateActiveException() ), \

View File

@ -277,9 +277,15 @@ namespace Catch {
}
duration = timer.getElapsedSeconds();
}
catch( TestFailureException& ) {
#ifdef INTERNAL_CATCH_VS_MANAGED // detect CLR
catch(AssertFailedException^) {
throw; // CLR always rethrows - stop on first assert
}
#else
catch( INTERNAL_CATCH_TEST_FAILURE_EXCEPTION ) {
// This just means the test was aborted due to failure
}
#endif
catch(...) {
ExpressionResultBuilder exResult( ResultWas::ThrewException );
exResult << translateActiveException();

View File

@ -11,6 +11,84 @@
#ifdef INTERNAL_CATCH_VS_MANAGED
#include <windows.h>
using namespace System;
using namespace System::Text;
using namespace System::Collections::Generic;
using namespace Microsoft::VisualStudio::TestTools::UnitTesting;
namespace Catch {
inline String^ convert_string_to_managed(const std::string& s)
{
String^ result = gcnew String(s.c_str());
return result;
}
}
#include "internal/catch_timer.hpp"
#include "internal/catch_vs_test_registry.hpp"
#include "reporters/catch_vs_reporter.hpp"
#include "internal/catch_exception_translator_registry.hpp"
namespace Catch {
class ExceptionRegistryHub : public IRegistryHub, public IMutableRegistryHub {
ExceptionRegistryHub( ExceptionRegistryHub const& );
void operator=( ExceptionRegistryHub const& );
public: // IRegistryHub
ExceptionRegistryHub() {
}
virtual IReporterRegistry const& getReporterRegistry() const {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual ITestCaseRegistry const& getTestCaseRegistry() const {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() {
return m_exceptionTranslatorRegistry;
}
public: // IMutableRegistryHub
virtual void registerReporter( std::string const&, IReporterFactory* ) {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual void registerTest( TestCase const& ) {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual void registerTranslator( const IExceptionTranslator* translator ) {
m_exceptionTranslatorRegistry.registerTranslator( translator );
}
private:
ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;
};
template <typename T>
struct GlobalRegistryHub
{
static T& instance()
{
if( !theRegistryHub )
theRegistryHub = new T();
return *theRegistryHub;
}
static T* theRegistryHub;
};
template <typename T>
T* GlobalRegistryHub<T>::theRegistryHub = NULL;
INTERNAL_CATCH_INLINE IMutableRegistryHub& getMutableRegistryHub() {
return GlobalRegistryHub<ExceptionRegistryHub>::instance();
}
INTERNAL_CATCH_INLINE std::string translateActiveException() {
return GlobalRegistryHub<ExceptionRegistryHub>::instance().getExceptionTranslatorRegistry().translateActiveException();
}
}
#endif
#endif // TWOBLUECUBES_CATCH_HPP_INCLUDED
#endif // TWOBLUECUBES_CATCH_VS_MANAGED_HPP_INCLUDED

View File

@ -11,6 +11,80 @@
#ifdef INTERNAL_CATCH_VS_NATIVE
#endif
#include "CppUnitTest.h"
using Microsoft::VisualStudio::CppUnitTestFramework::Logger;
using Microsoft::VisualStudio::CppUnitTestFramework::Assert;
using Microsoft::VisualStudio::CppUnitTestFramework::__LineInfo;
#define INTERNAL_CATCH_INLINE inline
#include <cvt/wstring>
#include <codecvt>
#include "internal/catch_timer.hpp"
#include "internal/catch_vs_test_registry.hpp"
#include "reporters/catch_vs_reporter.hpp"
#include "internal/catch_exception_translator_registry.hpp"
namespace Catch {
class ExceptionRegistryHub : public IRegistryHub, public IMutableRegistryHub {
ExceptionRegistryHub( ExceptionRegistryHub const& );
void operator=( ExceptionRegistryHub const& );
public: // IRegistryHub
ExceptionRegistryHub() {
}
virtual IReporterRegistry const& getReporterRegistry() const {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual ITestCaseRegistry const& getTestCaseRegistry() const {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual IExceptionTranslatorRegistry& getExceptionTranslatorRegistry() {
return m_exceptionTranslatorRegistry;
}
public: // IMutableRegistryHub
virtual void registerReporter( std::string const&, IReporterFactory* ) {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual void registerTest( TestCase const& ) {
throw std::runtime_error("can't do this for Visual Studio tests!");
}
virtual void registerTranslator( const IExceptionTranslator* translator ) {
m_exceptionTranslatorRegistry.registerTranslator( translator );
}
private:
ExceptionTranslatorRegistry m_exceptionTranslatorRegistry;
};
template <typename T>
struct GlobalRegistryHub
{
static T& instance()
{
if( !theRegistryHub )
theRegistryHub = new T();
return *theRegistryHub;
}
static T* theRegistryHub;
};
template <typename T>
T* GlobalRegistryHub<T>::theRegistryHub = NULL;
INTERNAL_CATCH_INLINE IMutableRegistryHub& getMutableRegistryHub() {
return GlobalRegistryHub<ExceptionRegistryHub>::instance();
}
INTERNAL_CATCH_INLINE std::string translateActiveException() {
return GlobalRegistryHub<ExceptionRegistryHub>::instance().getExceptionTranslatorRegistry().translateActiveException();
}
}
#endif // INTERNAL_CATCH_VS_NATIVE
#endif // TWOBLUECUBES_CATCH_VS_NATIVE_HPP_INCLUDED

View File

@ -0,0 +1,405 @@
/*
* Created by Malcolm on 6/11/2013.
* Copyright 2013 Malcolm Noyes. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_MSTEST_REGISTRY_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_MSTEST_REGISTRY_HPP_INCLUDED
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wweak-vtables"
#endif
#include "catch_common.h"
#include "catch_interfaces_testcase.h"
#include "internal/catch_compiler_capabilities.h"
//#include "catch_config.hpp"
#include <tchar.h>
namespace Catch {
typedef void(*TestFunction)();
class FreeFunctionTestCase : public SharedImpl<ITestCase> {
public:
FreeFunctionTestCase( TestFunction fun ) : m_fun( fun ) {}
virtual void invoke() const {
m_fun();
}
private:
virtual ~FreeFunctionTestCase();
TestFunction m_fun;
};
/*inline std::string translateActiveException() {
try {
#ifdef __OBJC__
// In Objective-C try objective-c exceptions first
@try {
throw;
}
@catch (NSException *exception) {
return toString( [exception description] );
}
#else
throw;
#endif
}
catch( std::exception& ex ) {
return ex.what();
}
catch( std::string& msg ) {
return msg;
}
catch( const char* msg ) {
return msg;
}
catch(...) {
return "Unknown exception";
}
}*/
class MethodTestCase : public SharedImpl<ITestCase> {
struct placeholder
{
virtual ~placeholder() {}
virtual placeholder* clone() const = 0;
virtual void invoke() const = 0;
};
template <typename C>
struct holder : public placeholder
{
holder( void (C::*method)() ) : m_method( method ) {}
virtual placeholder* clone() const {return new holder(*this);}
void invoke() const {
C obj;
(obj.*m_method)();
}
void (C::*m_method)();
};
virtual void invoke() const
{
if( held ) held->invoke();
}
public:
template<typename C>
MethodTestCase( void (C::*method)() ) : held(new holder<C>(method) ) {}
~MethodTestCase() { delete held;}
private:
MethodTestCase(); // not implemented
MethodTestCase(const MethodTestCase&); // not implemented
MethodTestCase& operator=(const MethodTestCase&); // not implemented
placeholder* held;
};
typedef void(*TestFunction)();
struct NameAndDesc {
#if (_MANAGED == 1) || (_M_CEE == 1) // detect CLR
NameAndDesc( const char* _name = "", const char* _description= "" )
: name( _name ), description( _description )
{}
NameAndDesc( const char* _name, int )
: name( _name ), description( "" )
{}
#else
NameAndDesc( const wchar_t* _name, const char* _description= "" )
: name(), description( _description )
{
stdext::cvt::wstring_convert<std::codecvt_utf8<wchar_t> > conv1;
name = conv1.to_bytes(_name);
}
NameAndDesc( const wchar_t* _name, int )
: name(), description( "" )
{
stdext::cvt::wstring_convert<std::codecvt_utf8<wchar_t> > conv1;
name = conv1.to_bytes(_name);
}
#endif
std::string name;
std::string description;
};
} // end namespace Catch
#if (_MANAGED == 1) || (_M_CEE == 1) // detect CLR
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM2( name ) name##""
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM(...) CATCH_INTERNAL_HANDLE_EMPTY_PARAM2( INTERNAL_CATCH_SPLIT_ARGS_2(__VA_ARGS__) )
#define INTERNAL_CATCH_CLASS_DEFINITION( cls ) \
[TestClass] \
public ref class cls
#define INTERNAL_CATCH_CLASS_CONTEXT \
private: \
TestContext^ testContextInstance; \
public: \
property Microsoft::VisualStudio::TestTools::UnitTesting::TestContext^ TestContext \
{ \
Microsoft::VisualStudio::TestTools::UnitTesting::TestContext^ get() \
{ \
return testContextInstance; \
} \
System::Void set(Microsoft::VisualStudio::TestTools::UnitTesting::TestContext^ value) \
{ \
testContextInstance = value; \
} \
};
#define CATCH_INTERNAL_NAMESPACE( Ext )
#define INTERNAL_CATCH_TEST_METHOD( Method, UniqueExt, Name, Desc ) \
public: \
[TestMethod] \
[Description( CATCH_INTERNAL_HANDLE_EMPTY_PARAM(Name) )] \
[TestProperty( "Description", CATCH_INTERNAL_HANDLE_EMPTY_PARAM(Name) )] \
void INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___M_E_T_H_O_D___, UniqueExt) () \
{ \
Catch::NameAndDesc name_desc( CATCH_INTERNAL_HANDLE_EMPTY_PARAM(Name), Desc ); \
CATCH_INTERNAL_RUN_SINGLE_TEST( Method ); \
}
#define INTERNAL_CATCH_TEST_CLASS_METHOD( Method, UniqueExt, Name, Desc ) \
public: \
[TestMethod] \
[Description( CATCH_INTERNAL_HANDLE_EMPTY_PARAM(Name) )] \
[TestProperty( "Description", CATCH_INTERNAL_HANDLE_EMPTY_PARAM(Name) )] \
void INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___M_E_T_H_O_D___, UniqueExt) () \
{ \
Catch::NameAndDesc name_desc( CATCH_INTERNAL_HANDLE_EMPTY_PARAM(Name), Desc ); \
CATCH_INTERNAL_RUN_SINGLE_CLASS_TEST( Method ); \
}
#define CHECK_FOR_TEST_CASE_CLASH
#else // detect CLR
// Native tests
#define INTERNAL_CATCH_CLASS_DEFINITION( cls ) \
TEST_CLASS( cls )
#define INTERNAL_CATCH_CLASS_CONTEXT
#define CATCH_INTERNAL_NAMESPACE( Ext ) INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___N_S_, Ext )
#define TEST2( ... ) TEST_IMPL_2( (__VA_ARGS__, 2, 1) )
#define TEST_IMPL_2(tuple) TEST_IMPL2 tuple
#define TEST_IMPL2( INTERNAL_CATCH_SPLIT_ARG_1,INTERNAL_CATCH_SPLIT_ARG_2,N,...) L#INTERNAL_CATCH_SPLIT_ARG_1
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM(...) CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPL( (__VA_ARGS__, 2, 1) )
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPL(tuple) CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPL2 tuple
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPL2( INTERNAL_CATCH_SPLIT_ARG_1,INTERNAL_CATCH_SPLIT_ARG_2,N,...) #INTERNAL_CATCH_SPLIT_ARG_1
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(...) CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPLW( (__VA_ARGS__, 2, 1) )
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPLW(tuple) CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPL2W tuple
#define CATCH_INTERNAL_HANDLE_EMPTY_PARAM_IMPL2W( INTERNAL_CATCH_SPLIT_ARG_1,INTERNAL_CATCH_SPLIT_ARG_2,N,...) L#INTERNAL_CATCH_SPLIT_ARG_1
#define INTERNAL_CATCH_TEST_METHOD( Method, UniqueExt, Name, Desc ) \
public: \
BEGIN_TEST_METHOD_ATTRIBUTE( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___M_E_T_H_O_D___, UniqueExt) ) \
TEST_OWNER( CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(Name) ) \
TEST_DESCRIPTION( CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(Name) ) \
END_TEST_METHOD_ATTRIBUTE() \
TEST_METHOD( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___M_E_T_H_O_D___, UniqueExt) ) \
{ \
Catch::NameAndDesc name_desc(CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(Name), Desc ); \
CATCH_INTERNAL_RUN_SINGLE_TEST( Method ); \
}
#define INTERNAL_CATCH_TEST_CLASS_METHOD( Method, UniqueExt, Name, Desc ) \
public: \
BEGIN_TEST_METHOD_ATTRIBUTE( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___M_E_T_H_O_D___, UniqueExt) ) \
TEST_OWNER( CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(Name) ) \
TEST_DESCRIPTION( CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(Name) ) \
END_TEST_METHOD_ATTRIBUTE() \
TEST_METHOD( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H___M_E_T_H_O_D___, UniqueExt) ) \
{ \
Catch::NameAndDesc name_desc( CATCH_INTERNAL_HANDLE_EMPTY_PARAMW(Name), Desc ); \
CATCH_INTERNAL_RUN_SINGLE_CLASS_TEST( Method ); \
}
#define CHECK_FOR_TEST_CASE_CLASH void INTERNAL_CATCH_UNIQUE_NAME_LINE( if_you_get_this_error_you_have_a_test_case_name_clash_please_put_a_namespace_around_the_test_case_at_line_, __LINE__ )() {}
#endif // detect CLR
#define INTERNAL_CATCH_CONCAT_LINE_COUNTER INTERNAL_CATCH_UNIQUE_NAME_LINE( INTERNAL_CATCH_UNIQUE_NAME_LINE( __LINE__, _ ), __COUNTER__ )
#define CATCH_INTERNAL_RUN_SINGLE_TEST( Method ) \
{ Catch::ConfigData cd; \
cd.name = name_desc.name; \
Catch::Ptr<Catch::Config> config(new Catch::Config(cd)); \
Catch::MSTestReporter* rep = new Catch::MSTestReporter(config.get()); \
Catch::RunContext tr(config.get(), rep); \
Catch::TestCase tc = Catch::makeTestCase( new Catch::FreeFunctionTestCase( & Method ), "", name_desc.name, name_desc.description, CATCH_INTERNAL_LINEINFO ); \
tr.runTest(tc); \
}
#define CATCH_INTERNAL_RUN_SINGLE_CLASS_TEST( ClassMethod ) \
{ Catch::ConfigData cd; \
cd.name = name_desc.name; \
Catch::Ptr<Catch::Config> config(new Catch::Config(cd)); \
Catch::MSTestReporter* rep = new Catch::MSTestReporter(config.get()); \
Catch::RunContext tr(config.get(), rep); \
Catch::TestCase tc = Catch::makeTestCase( new Catch::MethodTestCase( & ClassMethod ), # ClassMethod, name_desc.name, name_desc.description, CATCH_INTERNAL_LINEINFO ); \
tr.runTest(tc); \
}
#define INTERNAL_CATCH_TESTCASE2( UniqueExt, Name, Desc ) \
CHECK_FOR_TEST_CASE_CLASH \
static void INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt )(); \
namespace CATCH_INTERNAL_NAMESPACE( UniqueExt ) { \
INTERNAL_CATCH_CLASS_DEFINITION( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____C_L_A_S_S___, UniqueExt ) ) \
{ \
INTERNAL_CATCH_CLASS_CONTEXT \
INTERNAL_CATCH_TEST_METHOD( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt ), UniqueExt, Name, Desc ) \
}; \
} \
void INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt )()
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE2( QualifiedMethod, UniqueExt, Name, Desc ) \
CHECK_FOR_TEST_CASE_CLASH \
namespace CATCH_INTERNAL_NAMESPACE( UniqueExt ) { \
INTERNAL_CATCH_CLASS_DEFINITION( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____C_L_A_S_S___, UniqueExt ) ) \
{ \
INTERNAL_CATCH_CLASS_CONTEXT \
INTERNAL_CATCH_TEST_CLASS_METHOD( QualifiedMethod, UniqueExt, Name, Desc ) \
}; \
};
#define INTERNAL_CATCH_TEST_CASE_METHOD2( ClassName, UniqueExt, TestName, Desc ) \
CHECK_FOR_TEST_CASE_CLASH \
struct INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt ) : ClassName { \
void test(); \
static void invoke() { INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt ) tmp; tmp.test(); } \
}; \
namespace CATCH_INTERNAL_NAMESPACE( UniqueExt ) { \
INTERNAL_CATCH_CLASS_DEFINITION( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____C_L_A_S_S___, UniqueExt ) ) \
{ \
INTERNAL_CATCH_CLASS_CONTEXT \
INTERNAL_CATCH_TEST_METHOD( INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt )::invoke, UniqueExt, TestName, Desc ) \
}; \
} \
void INTERNAL_CATCH_UNIQUE_NAME_LINE( C_A_T_C_H____T_E_S_T____, UniqueExt )::test()
//#undef CATCH_CONFIG_VARIADIC_MACROS
#ifdef CATCH_CONFIG_VARIADIC_MACROS
#define INTERNAL_CATCH_SPLIT_ARGS_2( ... ) INTERNAL_CATCH_SPLIT_ARGS_IMPL_2((__VA_ARGS__, 2,1))
#define INTERNAL_CATCH_SPLIT_ARGS_IMPL_2(tuple) INTERNAL_CATCH_SPLIT_ARGS_IMPL2 tuple
#define INTERNAL_CATCH_SPLIT_ARGS_IMPL2(INTERNAL_CATCH_SPLIT_ARG_1,INTERNAL_CATCH_SPLIT_ARG_2,N,...) INTERNAL_CATCH_SPLIT_ARG_1
#define INTERNAL_CATCH_SPLIT_TAGS( ... ) INTERNAL_CATCH_SPLIT_TAGS_IMPL((__VA_ARGS__, 2,1))
#define INTERNAL_CATCH_SPLIT_TAGS_IMPL(tuple) INTERNAL_CATCH_SPLIT_TAGS_IMPL_ tuple
#define INTERNAL_CATCH_SPLIT_TAGS_IMPL_(INTERNAL_CATCH_SPLIT_ARG_1,INTERNAL_CATCH_SPLIT_ARG_2,N,...) INTERNAL_CATCH_SPLIT_ARG_2
#define INTERNAL_CATCH_TESTCASE( ... ) \
INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_CONCAT_LINE_COUNTER, INTERNAL_CATCH_SPLIT_ARGS_2(__VA_ARGS__), INTERNAL_CATCH_SPLIT_TAGS(__VA_ARGS__) )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, ... ) \
INTERNAL_CATCH_METHOD_AS_TEST_CASE2( QualifiedMethod, INTERNAL_CATCH_CONCAT_LINE_COUNTER, INTERNAL_CATCH_SPLIT_ARGS_2(__VA_ARGS__), INTERNAL_CATCH_SPLIT_TAGS(__VA_ARGS__) )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, ... )\
INTERNAL_CATCH_TEST_CASE_METHOD2(ClassName, INTERNAL_CATCH_CONCAT_LINE_COUNTER, INTERNAL_CATCH_SPLIT_ARGS_2(__VA_ARGS__), INTERNAL_CATCH_SPLIT_TAGS(__VA_ARGS__) )
#else
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TESTCASE( Name, Desc ) \
INTERNAL_CATCH_TESTCASE2( INTERNAL_CATCH_CONCAT_LINE_COUNTER, Name, Desc )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_METHOD_AS_TEST_CASE( QualifiedMethod, Name, Desc ) \
INTERNAL_CATCH_METHOD_AS_TEST_CASE2( QualifiedMethod, INTERNAL_CATCH_CONCAT_LINE_COUNTER, Name, Desc )
///////////////////////////////////////////////////////////////////////////////
#define INTERNAL_CATCH_TEST_CASE_METHOD( ClassName, TestName, Desc )\
INTERNAL_CATCH_TEST_CASE_METHOD2(ClassName, INTERNAL_CATCH_CONCAT_LINE_COUNTER, TestName, Desc )
#endif
#include "catch_test_case_info.hpp"
#include "catch_assertionresult.hpp"
#include "catch_expressionresult_builder.hpp"
#include "catch_version.hpp"
#include "catch_text.h"
#include "catch_text.hpp"
#include "catch_runner_impl.hpp"
#include "catch_message.hpp"
#include "catch_context_impl.hpp"
#include "catch_generators_impl.hpp"
#include "catch_test_case_info.hpp"
#include "catch_notimplemented_exception.hpp"
#include "catch_exception_translator_registry.hpp"
namespace Catch {
inline NonCopyable::~NonCopyable() {}
inline IShared::~IShared() {}
inline StreamBufBase::~StreamBufBase() throw() {}
inline IContext::~IContext() {}
inline IResultCapture::~IResultCapture() {}
inline ITestCase::~ITestCase() {}
inline ITestCaseRegistry::~ITestCaseRegistry() {}
inline IRegistryHub::~IRegistryHub() {}
inline IMutableRegistryHub::~IMutableRegistryHub() {}
inline IExceptionTranslator::~IExceptionTranslator() {}
inline IExceptionTranslatorRegistry::~IExceptionTranslatorRegistry() {}
inline IReporter::~IReporter() {}
inline IReporterFactory::~IReporterFactory() {}
inline IReporterRegistry::~IReporterRegistry() {}
inline IStreamingReporter::~IStreamingReporter() {}
inline AssertionStats::~AssertionStats() {}
inline SectionStats::~SectionStats() {}
inline TestCaseStats::~TestCaseStats() {}
inline TestGroupStats::~TestGroupStats() {}
inline TestRunStats::~TestRunStats() {}
//CumulativeReporterBase::SectionNode::~SectionNode() {}
//CumulativeReporterBase::~CumulativeReporterBase() {}
//StreamingReporterBase::~StreamingReporterBase() {}
//ConsoleReporter::~ConsoleReporter() {}
inline IRunner::~IRunner() {}
inline IMutableContext::~IMutableContext() {}
inline IConfig::~IConfig() {}
//XmlReporter::~XmlReporter() {}
//JunitReporter::~JunitReporter() {}
//TestRegistry::~TestRegistry() {}
inline FreeFunctionTestCase::~FreeFunctionTestCase() {}
inline IGeneratorInfo::~IGeneratorInfo() {}
inline IGeneratorsForTest::~IGeneratorsForTest() {}
inline TagParser::~TagParser() {}
inline TagExtracter::~TagExtracter() {}
inline TagExpressionParser::~TagExpressionParser() {}
inline Matchers::Impl::StdString::Equals::~Equals() {}
inline Matchers::Impl::StdString::Contains::~Contains() {}
inline Matchers::Impl::StdString::StartsWith::~StartsWith() {}
inline Matchers::Impl::StdString::EndsWith::~EndsWith() {}
inline void Config::dummy() {}
//INTERNAL_CATCH_REGISTER_LEGACY_REPORTER( "xml", XmlReporter )
}
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#endif // TWOBLUECUBES_CATCH_MSTEST_REGISTRY_HPP_INCLUDED

View File

@ -0,0 +1,458 @@
/*
* Created by Malcolm on 4/11/2013.
* Copyright 2013 Malcolm Noyes. All rights reserved.
*
* Distributed under the Boost Software License, Version 1.0. (See accompanying
* file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
*/
#ifndef TWOBLUECUBES_CATCH_REPORTER_MSTEST_HPP_INCLUDED
#define TWOBLUECUBES_CATCH_REPORTER_MSTEST_HPP_INCLUDED
#include "../internal/catch_interfaces_reporter.h"
//#include "../internal/catch_reporter_registrars.hpp"
#include "../internal/catch_text.h"
//#include "../internal/catch_console_colour.hpp"
#include "../internal/catch_version.h"
//#include <sstream>
namespace Catch {
#if (_MANAGED == 1) || (_M_CEE == 1) // detect CLR
inline void write_output_message(const std::string& msg)
{
String^ tmp = gcnew String(msg.c_str());
Console::WriteLine(tmp);
}
#else // detect CLR
#ifdef _WINDLL
#ifdef _UNICODE
inline void write_output_message(const std::string& msg)
{
std::wstringstream _s;
_s << msg.c_str();
std::wstring ws = _s.str();
Logger::WriteMessage(ws.c_str());
}
#else
inline void write_output_message(const std::string& msg)
{
Logger::WriteMessage(msg.c_str());
}
#endif
#endif // _WINDLL
#endif // detect CLR
struct MSTestReporter : SharedImpl<IStreamingReporter> {
MSTestReporter( Ptr<IConfig> const& _fullConfig )
: m_config( _fullConfig ),
m_headerPrinted( false ),
m_atLeastOneTestCasePrinted( false )
{}
virtual ~MSTestReporter() {
if( m_atLeastOneTestCasePrinted ) {
write_output_message(stream.str());
}
}
static std::string getDescription() {
return "Reports test results to MSTest";
}
virtual ReporterPreferences getPreferences() const {
ReporterPreferences prefs;
prefs.shouldRedirectStdOut = true;
return prefs;
}
//base
virtual void noMatchingTestCases( std::string const& ) {}
virtual void testRunStarting( TestRunInfo const& _testRunInfo ) {
currentTestRunInfo = _testRunInfo;
}
virtual void testGroupStarting( GroupInfo const& _groupInfo ) {
currentGroupInfo = _groupInfo;
}
virtual void testCaseStarting( TestCaseInfo const& _testInfo ) {
currentTestCaseInfo = _testInfo;
}
virtual void sectionStarting( SectionInfo const& _sectionInfo ) {
m_headerPrinted = false;
m_sectionStack.push_back( _sectionInfo );
}
virtual void sectionEnded( SectionStats const& _sectionStats ) {
if( _sectionStats.missingAssertions ) {
lazyPrint();
if( m_sectionStack.size() > 1 )
stream << "\r\n" << "No assertions in section";
else
stream << "\r\n" << "No assertions in test case";
stream << " '" << _sectionStats.sectionInfo.name << "'" << "\r\n" << "\r\n";
}
if( m_headerPrinted ) {
if( m_config->showDurations() == ShowDurations::Always )
stream << "Completed in " << _sectionStats.durationInSeconds << "s" << "\r\n";
m_headerPrinted = false;
}
else {
if( m_config->showDurations() == ShowDurations::Always )
stream << _sectionStats.sectionInfo.name << " completed in " << _sectionStats.durationInSeconds << "s" << "\r\n";
}
m_sectionStack.pop_back();
}
virtual void testCaseEnded( TestCaseStats const& _testCaseStats ) {
if( !_testCaseStats.stdOut.empty() ) {
write_output_message(getDoubleDashes());
write_output_message("Output to std::cout :");
write_output_message(getDashes());
write_output_message(_testCaseStats.stdOut);
write_output_message(getDoubleDashes());
}
if( !_testCaseStats.stdErr.empty() ) {
write_output_message(getDoubleDashes());
write_output_message("Output to std::cerr :");
write_output_message(getDashes());
write_output_message(_testCaseStats.stdErr);
write_output_message(getDoubleDashes());
}
if( _testCaseStats.totals.assertions.failed ) {
Assert::IsTrue(false, L"At least one test failed - examine output for CHECK failures.");
}
m_headerPrinted = false;
currentTestCaseInfo.reset();
assert( m_sectionStack.empty() );
}
virtual void testGroupEnded( TestGroupStats const& _testGroupStats ) {
if( currentGroupInfo.used ) {
printSummaryDivider();
stream << "Summary for group '" << _testGroupStats.groupInfo.name << "':" << "\r\n";
printTotals( _testGroupStats.totals );
stream << "\r\n" << "\r\n";
}
currentGroupInfo.reset();
}
virtual void testRunEnded( TestRunStats const& _testRunStats ) {
if( m_atLeastOneTestCasePrinted )
printTotalsDivider();
printTotals( _testRunStats.totals );
stream << "\r\n" << "\r\n";
currentTestCaseInfo.reset();
currentGroupInfo.reset();
currentTestRunInfo.reset();
}
// base end
virtual void assertionStarting( AssertionInfo const& ) {
}
virtual bool assertionEnded( AssertionStats const& _assertionStats ) {
AssertionResult const& result = _assertionStats.assertionResult;
// Drop out if result was successful and we're not printing those
if( !m_config->includeSuccessfulResults() && result.isOk() )
return false;
lazyPrint();
AssertionPrinter printer( stream, _assertionStats );
printer.print();
stream << "\r\n";
return true;
}
private:
class AssertionPrinter {
void operator= ( AssertionPrinter const& );
public:
AssertionPrinter( std::ostream& _stream, AssertionStats const& _stats )
: stream( _stream ),
stats( _stats ),
result( _stats.assertionResult ),
message( result.getMessage() ),
messages( _stats.infoMessages )
{
switch( result.getResultType() ) {
case ResultWas::Ok:
passOrFail = "PASSED";
//if( result.hasMessage() )
if( _stats.infoMessages.size() == 1 )
messageLabel = "with message";
if( _stats.infoMessages.size() > 1 )
messageLabel = "with messages";
break;
case ResultWas::ExpressionFailed:
if( result.isOk() ) {
passOrFail = "FAILED - but was ok";
}
else {
passOrFail = "FAILED";
}
if( _stats.infoMessages.size() == 1 )
messageLabel = "with message";
if( _stats.infoMessages.size() > 1 )
messageLabel = "with messages";
break;
case ResultWas::ThrewException:
passOrFail = "FAILED";
messageLabel = "due to unexpected exception with message";
break;
case ResultWas::DidntThrowException:
passOrFail = "FAILED";
messageLabel = "because no exception was thrown where one was expected";
break;
case ResultWas::Info:
messageLabel = "info";
break;
case ResultWas::Warning:
messageLabel = "warning";
break;
case ResultWas::ExplicitFailure:
passOrFail = "FAILED";
if( _stats.infoMessages.size() == 1 )
messageLabel = "explicitly with message";
if( _stats.infoMessages.size() > 1 )
messageLabel = "explicitly with messages";
break;
// These cases are here to prevent compiler warnings
case ResultWas::Unknown:
case ResultWas::FailureBit:
case ResultWas::Exception:
passOrFail = "** internal error **";
break;
}
}
void print() const {
printSourceInfo();
if( stats.totals.assertions.total() > 0 ) {
if( result.isOk() )
stream << "\r\n";
printResultType();
printOriginalExpression();
printReconstructedExpression();
}
else {
stream << "\r\n";
}
printMessage();
}
private:
void printResultType() const {
if( !passOrFail.empty() ) {
stream << passOrFail << ":" << "\r\n";
}
}
void printOriginalExpression() const {
if( result.hasExpression() ) {
stream << " ";
stream << result.getExpressionInMacro();
stream << "\r\n";
}
}
void printReconstructedExpression() const {
if( result.hasExpandedExpression() ) {
stream << "with expansion:" << "\r\n";
stream << Text( result.getExpandedExpression(), TextAttributes().setIndent(2) ) << "\r\n";
}
}
void printMessage() const {
if( !messageLabel.empty() )
stream << messageLabel << ":" << "\r\n";
for( std::vector<MessageInfo>::const_iterator it = messages.begin(), itEnd = messages.end();
it != itEnd;
++it ) {
stream << Text( it->message, TextAttributes().setIndent(2) ) << "\r\n";
}
}
void printSourceInfo() const {
stream << result.getSourceInfo() << ": ";
}
std::ostream& stream;
AssertionStats const& stats;
AssertionResult const& result;
std::string passOrFail;
std::string messageLabel;
std::string message;
std::vector<MessageInfo> messages;
};
void lazyPrint() {
if( !currentTestRunInfo.used )
lazyPrintRunInfo();
if( !currentGroupInfo.used )
lazyPrintGroupInfo();
if( !m_headerPrinted ) {
printTestCaseAndSectionHeader();
m_headerPrinted = true;
}
m_atLeastOneTestCasePrinted = true;
}
void lazyPrintRunInfo() {
stream << getTildes() << "\r\n";
stream << "Using Catch v" << libraryVersion::value.majorVersion << "."
<< libraryVersion::value.minorVersion << " b"
<< libraryVersion::value.buildNumber;
if( libraryVersion::value.branchName != "master" )
stream << " (" << libraryVersion::value.branchName << ")";
#if (_MANAGED == 1) || (_M_CEE == 1) // detect CLR
stream << " for a managed MSTest project." << "\r\n";
#else
#ifdef _WINDLL
stream << " for a native MSTest project." << "\r\n";
#endif
#endif
currentTestRunInfo.used = true;
}
void lazyPrintGroupInfo() {
if( currentGroupInfo.some() )
{
if( !currentGroupInfo->name.empty() && currentGroupInfo->groupsCounts > 1 ) {
printClosedHeader( "Group: " + currentGroupInfo->name );
currentGroupInfo.used = true;
}
}
}
void printTestCaseAndSectionHeader() {
assert( !m_sectionStack.empty() );
printOpenHeader( currentTestCaseInfo->name );
if( m_sectionStack.size() > 1 ) {
std::vector<SectionInfo>::const_iterator
it = m_sectionStack.begin()+1, // Skip first section (test case)
itEnd = m_sectionStack.end();
for( ; it != itEnd; ++it )
printHeaderString( it->name, 2 );
}
SourceLineInfo lineInfo = m_sectionStack.front().lineInfo;
if( !lineInfo.empty() ){
stream << getDashes() << "\r\n";
stream << lineInfo << "\r\n";
}
stream << getDots() << "\r\n" << "\r\n";
}
void printClosedHeader( std::string const& _name ) {
printOpenHeader( _name );
stream << getDots() << "\r\n";
}
void printOpenHeader( std::string const& _name ) {
stream << getDashes() << "\r\n";
{
printHeaderString( _name );
}
}
// if string has a : in first line will set indent to follow it on
// subsequent lines
void printHeaderString( std::string const& _string, std::size_t indent = 0 ) {
std::size_t i = _string.find( ": " );
if( i != std::string::npos )
i+=2;
else
i = 0;
stream << Text( _string, TextAttributes()
.setIndent( indent+i)
.setInitialIndent( indent ) ) << "\r\n";
}
void printTotals( const Totals& totals ) {
if( totals.assertions.total() == 0 ) {
stream << "No tests ran";
}
else if( totals.assertions.failed ) {
printCounts( "test case", totals.testCases );
if( totals.testCases.failed > 0 ) {
stream << " (";
printCounts( "assertion", totals.assertions );
stream << ")";
}
}
else {
stream << "All tests passed ("
<< pluralise( totals.assertions.passed, "assertion" ) << " in "
<< pluralise( totals.testCases.passed, "test case" ) << ")";
}
}
void printCounts( std::string const& label, Counts const& counts ) {
if( counts.total() == 1 ) {
stream << "1 " << label << " - ";
if( counts.failed )
stream << "failed";
else
stream << "passed";
}
else {
stream << counts.total() << " " << label << "s ";
if( counts.passed ) {
if( counts.failed )
stream << "- " << counts.failed << " failed";
else if( counts.passed == 2 )
stream << "- both passed";
else
stream << "- all passed";
}
else {
if( counts.failed == 2 )
stream << "- both failed";
else
stream << "- all failed";
}
}
}
void printTotalsDivider() {
stream << getDoubleDashes() << "\r\n";
}
void printSummaryDivider() {
stream << getDashes() << "\r\n";
}
static std::string getDashes() {
std::string dashes( CATCH_CONFIG_CONSOLE_WIDTH-1, '-' );
return dashes;
}
static std::string getDots() {
std::string dots( CATCH_CONFIG_CONSOLE_WIDTH-1, '.' );
return dots;
}
static std::string getDoubleDashes() {
std::string doubleDashes( CATCH_CONFIG_CONSOLE_WIDTH-1, '=' );
return doubleDashes;
}
static std::string getTildes() {
std::string dots( CATCH_CONFIG_CONSOLE_WIDTH-1, '~' );
return dots;
}
private:
Ptr<IConfig> m_config;
std::ostringstream stream;
LazyStat<TestRunInfo> currentTestRunInfo;
LazyStat<GroupInfo> currentGroupInfo;
LazyStat<TestCaseInfo> currentTestCaseInfo;
std::vector<SectionInfo> m_sectionStack;
bool m_headerPrinted;
bool m_atLeastOneTestCasePrinted;
};
} // end namespace Catch
#endif // TWOBLUECUBES_CATCH_REPORTER_MSTEST_HPP_INCLUDED

View File

@ -8,7 +8,7 @@
#include "catch.hpp"
namespace
namespace ClassTests
{
class TestClass
{
@ -28,13 +28,13 @@ namespace
REQUIRE( s == "world" );
}
};
// Note: TestClass conflicts with template class with same name in VS2012 native tests
METHOD_AS_TEST_CASE( ClassTests::TestClass::succeedingCase, "./succeeding/TestClass/succeedingCase", "A method based test run that succeeds [class]" )
METHOD_AS_TEST_CASE( ClassTests::TestClass::failingCase, "./failing/TestClass/failingCase", "A method based test run that fails [class]" )
}
METHOD_AS_TEST_CASE( TestClass::succeedingCase, "./succeeding/TestClass/succeedingCase", "A method based test run that succeeds [class]" )
METHOD_AS_TEST_CASE( TestClass::failingCase, "./failing/TestClass/failingCase", "A method based test run that fails [class]" )
struct Fixture
{
Fixture() : m_a( 1 ) {}

View File

@ -42,6 +42,8 @@ struct TestDef {
// The "failing" tests all use the CHECK macro, which continues if the specific test fails.
// This allows us to see all results, even if an earlier check fails
namespace ConditionTests {
// Equality tests
TEST_CASE( "./succeeding/conditions/equality",
"Equality checks that should succeed" )
@ -345,4 +347,4 @@ TEST_CASE( "./failing/conditions/not",
CHECK( !(1 == 1) );
CHECK_FALSE( 1 == 1 );
}
}

View File

@ -28,6 +28,9 @@ namespace
}
}
namespace ExceptionTests
{
TEST_CASE( "./succeeding/exceptions/explicit", "When checked exceptions are thrown they can be expected or unexpected" )
{
REQUIRE_THROWS_AS( thisThrows(), std::domain_error );
@ -141,3 +144,4 @@ TEST_CASE( "./succeeding/exceptions/notimplemented", "" )
{
REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) );
}
}

View File

@ -8,6 +8,9 @@
#include "catch.hpp"
namespace MessageTests
{
TEST_CASE( "./succeeding/message", "INFO and WARN do not abort tests" )
{
INFO( "this is a " << "message" ); // This should output the message if a failure occurs
@ -100,3 +103,4 @@ TEST_CASE( "just failure", "[fail][isolated info][.]" )
{
FAIL( "Previous info should not be seen" );
}
}

View File

@ -11,6 +11,9 @@
#include <iostream>
namespace MiscTests
{
TEST_CASE( "./succeeding/Misc/Sections", "random SECTION tests" )
{
int a = 1;
@ -364,3 +367,4 @@ TEST_CASE("./failing/CatchSectionInfiniteLoop", "")
// SUCCEED("yay");
//
//}
}

View File

@ -24,6 +24,9 @@ namespace Catch
}
}
namespace TrickTests
{
///////////////////////////////////////////////////////////////////////////////
TEST_CASE
(
@ -113,6 +116,7 @@ TEST_CASE
REQUIRE( i++ == 8 );
}
}
namespace A {
struct X

View File

@ -10,6 +10,8 @@
#ifdef CATCH_CONFIG_VARIADIC_MACROS
namespace VariadicMacroTests
{
TEST_CASE()
{
SUCCEED( "anonymous test case" );
@ -27,5 +29,6 @@ TEST_CASE( "Variadic macros", "[variadic][sections]" )
SUCCEED( "no assertions" );
}
}
}
#endif

View File

@ -0,0 +1,34 @@
#include "stdafx.h"
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute("ManagedTestCatch")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("Instron")];
[assembly:AssemblyProductAttribute("ManagedTestCatch")];
[assembly:AssemblyCopyrightAttribute("Copyright (c) Instron 2013")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];
[assembly:ComVisible(false)];

View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Local" id="0ee76c48-59a5-4c14-a4d5-d849401e9870" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are default test settings for a local test run.</Description>
<Deployment enabled="false" />
<Execution>
<TestTypeSpecific />
<AgentRule name="Execution Agents">
</AgentRule>
</Execution>
</TestSettings>

View File

@ -0,0 +1,30 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual Studio 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ManagedTestCatch", "ManagedTestCatch.vcxproj", "{7CC06A6B-763E-42B3-AF6C-8F1E340372A1}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{EAFF2A33-B90A-4957-A39D-F49589A088C8}"
ProjectSection(SolutionItems) = preProject
Local.testsettings = Local.testsettings
ManagedTestCatch.vsmdi = ManagedTestCatch.vsmdi
TraceAndTestImpact.testsettings = TraceAndTestImpact.testsettings
EndProjectSection
EndProject
Global
GlobalSection(TestCaseManagementSettings) = postSolution
CategoryFile = ManagedTestCatch.vsmdi
EndGlobalSection
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{7CC06A6B-763E-42B3-AF6C-8F1E340372A1}.Debug|Win32.ActiveCfg = Debug|Win32
{7CC06A6B-763E-42B3-AF6C-8F1E340372A1}.Debug|Win32.Build.0 = Debug|Win32
{7CC06A6B-763E-42B3-AF6C-8F1E340372A1}.Release|Win32.ActiveCfg = Release|Win32
{7CC06A6B-763E-42B3-AF6C-8F1E340372A1}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,115 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<TargetName>DefaultTest</TargetName>
<ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes>
<ProjectGUID>{7CC06A6B-763E-42B3-AF6C-8F1E340372A1}</ProjectGUID>
<Keyword>ManagedCProj</Keyword>
<RootNamespace>ManagedTestCatch</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>true</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<CLRSupport>Safe</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\10.0\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup>
<PostBuildEventCommand>if exist app.config copy app.config "$(OutDir)app.config"</PostBuildEventCommand>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</LinkIncremental>
<LinkIncremental Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level4</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>..\..\..\include</AdditionalIncludeDirectories>
<CompileAsManaged>true</CompileAsManaged>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>
</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<CompileAsManaged>true</CompileAsManaged>
<AdditionalIncludeDirectories>../../../include</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>
</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework" />
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\SelfTest\ApproxTests.cpp" />
<ClCompile Include="..\..\SelfTest\BDDTests.cpp" />
<ClCompile Include="..\..\SelfTest\ClassTests.cpp" />
<ClCompile Include="..\..\SelfTest\CmdLineTests.cpp" />
<ClCompile Include="..\..\SelfTest\ConditionTests.cpp" />
<ClCompile Include="..\..\SelfTest\ExceptionTests.cpp" />
<ClCompile Include="..\..\SelfTest\GeneratorTests.cpp" />
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests1.cpp" />
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests2.cpp" />
<ClCompile Include="..\..\SelfTest\MessageTests.cpp" />
<ClCompile Include="..\..\SelfTest\MiscTests.cpp" />
<ClCompile Include="..\..\SelfTest\SectionTrackerTests.cpp" />
<ClCompile Include="..\..\SelfTest\TrickyTests.cpp" />
<ClCompile Include="..\..\SelfTest\VariadicMacrosTests.cpp" />
<ClCompile Include="AssemblyInfo.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc" />
</ItemGroup>
<ItemGroup>
<None Include="app.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ClassTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ApproxTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\BDDTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\CmdLineTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ConditionTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ExceptionTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\GeneratorTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MiscTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\SectionTrackerTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\TrickyTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\VariadicMacrosTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests1.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<None Include="app.ico">
<Filter>Resource Files</Filter>
</None>
</ItemGroup>
</Project>

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestLists xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<TestList name="Lists of Tests" id="8c43106b-9dc1-4907-a29f-aa66a61bf5b6">
<RunConfiguration id="0ee76c48-59a5-4c14-a4d5-d849401e9870" name="Local" storage="local.testsettings" type="Microsoft.VisualStudio.TestTools.Common.TestRunConfiguration, Microsoft.VisualStudio.QualityTools.Common, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
</TestList>
</TestLists>

View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<TestSettings name="Trace and Test Impact" id="e9a68de0-6b94-4b74-9333-9b481e6a3d16" xmlns="http://microsoft.com/schemas/VisualStudio/TeamTest/2010">
<Description>These are test settings for Trace and Test Impact.</Description>
<Execution>
<TestTypeSpecific />
<AgentRule name="Execution Agents">
</AgentRule>
</Execution>
</TestSettings>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1,52 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon placed first or with lowest ID value becomes application icon
LANGUAGE 9, 2
#pragma code_page(1252)
1 ICON "app.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,3 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by app.rc

View File

@ -0,0 +1,5 @@
// stdafx.cpp : source file that includes just the standard includes
// ManagedTestCatch.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -0,0 +1,7 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once

View File

@ -0,0 +1,300 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<ClCompile Include="..\..\..\SelfTest\ApproxTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\BDDTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\catch_self_test.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\ClassTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\MiscTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\CmdLineTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\ConditionTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\ExceptionTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\GeneratorTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\MessageInstantiationTests1.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\MessageInstantiationTests2.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\MessageTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\SectionTrackerTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\VariadicMacrosTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\TestMain.cpp">
<Filter>Sources</Filter>
</ClCompile>
<ClCompile Include="..\..\..\SelfTest\TrickyTests.cpp">
<Filter>Sources</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\..\..\..\include\internal\catch_self_test.hpp">
<Filter>Sources</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\catch.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_approx.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_assertionresult.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_assertionresult.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_capture.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_commandline.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_common.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_compiler_capabilities.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_config.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_console_colour.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_console_colour_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_context.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_context_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_debugger.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_default_main.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_evaluate.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_exception_translator_registry.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_expression_decomposer.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_expression_lhs.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_expressionresult_builder.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_expressionresult_builder.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_generators.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_generators_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_capture.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_test_case_registry_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_config.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_exception.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_generators.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_registry_hub.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_reporter.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_runner.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_interfaces_testcase.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_legacy_reporter_adapter.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_legacy_reporter_adapter.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_list.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_matchers.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_message.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_message.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_notimplemented_exception.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_notimplemented_exception.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_objc.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_objc_arc.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_option.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_platform.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_ptr.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_registry_hub.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\reporters\catch_reporter_console.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\reporters\catch_reporter_junit.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_reporter_registrars.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_reporter_registry.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\reporters\catch_reporter_xml.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_result_type.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\catch_runner.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_runner_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_section.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\selftest\catch_self_test.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_sfinae.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_stream.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_streambuf.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_tags.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_test_case_info.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_test_case_info.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_test_case_tracker.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_xmlwriter.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_test_registry.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_test_spec.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_text.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_text.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_timer.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_timer.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_tostring.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_totals.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_version.h">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_version.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_vs_managed_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
<ClInclude Include="..\..\..\..\include\internal\catch_vs_native_impl.hpp">
<Filter>Headers</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<None Include="ReadMe.txt" />
</ItemGroup>
<ItemGroup>
<Filter Include="Headers">
<UniqueIdentifier>{18bce7d6-45c2-4f57-8334-f3e8469d4d41}</UniqueIdentifier>
</Filter>
<Filter Include="Sources">
<UniqueIdentifier>{fea8fbb4-5032-451a-ba31-e5cb8f32e0de}</UniqueIdentifier>
</Filter>
</ItemGroup>
</Project>

View File

@ -0,0 +1,34 @@
#include "stdafx.h"
using namespace System::Reflection;
using namespace System::Runtime::CompilerServices;
using namespace System::Runtime::InteropServices;
//
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
//
[assembly:AssemblyTitleAttribute("ManagedTestCatch2012")];
[assembly:AssemblyDescriptionAttribute("")];
[assembly:AssemblyConfigurationAttribute("")];
[assembly:AssemblyCompanyAttribute("Instron")];
[assembly:AssemblyProductAttribute("ManagedTestCatch2012")];
[assembly:AssemblyCopyrightAttribute("Copyright (c) Instron 2013")];
[assembly:AssemblyTrademarkAttribute("")];
[assembly:AssemblyCultureAttribute("")];
//
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the value or you can default the Build and Revision Numbers
// by using the '*' as shown below:
[assembly:AssemblyVersionAttribute("1.0.*")];
[assembly:ComVisible(false)];

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ManagedTestCatch", "ManagedTestCatch.vcxproj", "{9757CB21-B840-49A6-B057-9F322E543DD6}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{9757CB21-B840-49A6-B057-9F322E543DD6}.Debug|Win32.ActiveCfg = Debug|Win32
{9757CB21-B840-49A6-B057-9F322E543DD6}.Debug|Win32.Build.0 = Debug|Win32
{9757CB21-B840-49A6-B057-9F322E543DD6}.Release|Win32.ActiveCfg = Release|Win32
{9757CB21-B840-49A6-B057-9F322E543DD6}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,125 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<TargetName>DefaultTest</TargetName>
<ProjectTypes>{3AC096D0-A1C2-E12C-1390-A8335801FDAB};{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}</ProjectTypes>
<ProjectGUID>{9757CB21-B840-49A6-B057-9F322E543DD6}</ProjectGUID>
<Keyword>ManagedCProj</Keyword>
<RootNamespace>ManagedTestCatch2012</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<CLRSupport>Safe</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>v110</PlatformToolset>
<CLRSupport>Safe</CLRSupport>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(LocalAppData)\Microsoft\VisualStudio\11.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\11.0\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(LocalAppData)\Microsoft\VisualStudio\11.0\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(LocalAppData)\Microsoft\VisualStudio\11.0\Microsoft.Cpp.$(Platform).user.props')" />
</ImportGroup>
<PropertyGroup>
<PostBuildEventCommand>if exist app.config copy app.config "$(OutDir)app.config"</PostBuildEventCommand>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>../../../include</AdditionalIncludeDirectories>
<CompileAsManaged>true</CompileAsManaged>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies />
</Link>
<PreBuildEvent>
<Command>taskkill /F /IM vstest.executionengine.x86.exe /FI "MEMUSAGE gt 1"</Command>
</PreBuildEvent>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<AdditionalIncludeDirectories>../../../include</AdditionalIncludeDirectories>
<CompileAsManaged>true</CompileAsManaged>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies />
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualStudio.QualityTools.UnitTestFramework">
<HintPath>..\..\..\..\..\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\PublicAssemblies\Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll</HintPath>
<Private>false</Private>
</Reference>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\SelfTest\ApproxTests.cpp" />
<ClCompile Include="..\..\SelfTest\BDDTests.cpp" />
<ClCompile Include="..\..\SelfTest\ClassTests.cpp" />
<ClCompile Include="..\..\SelfTest\CmdLineTests.cpp" />
<ClCompile Include="..\..\SelfTest\ConditionTests.cpp" />
<ClCompile Include="..\..\SelfTest\ExceptionTests.cpp" />
<ClCompile Include="..\..\SelfTest\GeneratorTests.cpp" />
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests1.cpp" />
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests2.cpp" />
<ClCompile Include="..\..\SelfTest\MessageTests.cpp" />
<ClCompile Include="..\..\SelfTest\MiscTests.cpp" />
<ClCompile Include="..\..\SelfTest\SectionTrackerTests.cpp" />
<ClCompile Include="..\..\SelfTest\TrickyTests.cpp" />
<ClCompile Include="..\..\SelfTest\VariadicMacrosTests.cpp" />
<ClCompile Include="AssemblyInfo.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="resource.h" />
<ClInclude Include="stdafx.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="app.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,85 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="AssemblyInfo.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\VariadicMacrosTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ApproxTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\BDDTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ClassTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\CmdLineTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ConditionTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ExceptionTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\GeneratorTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MiscTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\SectionTrackerTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\TrickyTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests1.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="app.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="app.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.9 KiB

View File

@ -0,0 +1,52 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
#undef APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
// English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
//
// Icon
//
// Icon placed first or with lowest ID value becomes application icon
LANGUAGE 9, 2
#pragma code_page(1252)
1 ICON "app.ico"
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// TEXTINCLUDE
//
1 TEXTINCLUDE
BEGIN
"resource.h\0"
"\0"
END
#endif // APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
#ifndef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
//
// Generated from the TEXTINCLUDE 3 resource.
//
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

View File

@ -0,0 +1,3 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by app.rc

View File

@ -0,0 +1,5 @@
// stdafx.cpp : source file that includes just the standard includes
// ManagedTestCatch2012.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"

View File

@ -0,0 +1,7 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently,
// but are changed infrequently
#pragma once

View File

@ -0,0 +1,20 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2012
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "NativeTestCatch", "NativeTestCatch.vcxproj", "{977CE524-3FC7-4281-9C1B-77C210F24A9B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{977CE524-3FC7-4281-9C1B-77C210F24A9B}.Debug|Win32.ActiveCfg = Debug|Win32
{977CE524-3FC7-4281-9C1B-77C210F24A9B}.Debug|Win32.Build.0 = Debug|Win32
{977CE524-3FC7-4281-9C1B-77C210F24A9B}.Release|Win32.ActiveCfg = Release|Win32
{977CE524-3FC7-4281-9C1B-77C210F24A9B}.Release|Win32.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal

View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{977CE524-3FC7-4281-9C1B-77C210F24A9B}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>NativeTestCatch</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v110</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
<UseOfMfc>false</UseOfMfc>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>../../../include;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<UseFullPaths>true</UseFullPaths>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>../../../include;$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<UseFullPaths>true</UseFullPaths>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<AdditionalLibraryDirectories>$(VCInstallDir)UnitTest\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="..\..\SelfTest\ApproxTests.cpp" />
<ClCompile Include="..\..\SelfTest\BDDTests.cpp" />
<ClCompile Include="..\..\SelfTest\ClassTests.cpp" />
<ClCompile Include="..\..\SelfTest\CmdLineTests.cpp" />
<ClCompile Include="..\..\SelfTest\ConditionTests.cpp" />
<ClCompile Include="..\..\SelfTest\ExceptionTests.cpp" />
<ClCompile Include="..\..\SelfTest\GeneratorTests.cpp" />
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests1.cpp" />
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests2.cpp" />
<ClCompile Include="..\..\SelfTest\MessageTests.cpp" />
<ClCompile Include="..\..\SelfTest\MiscTests.cpp" />
<ClCompile Include="..\..\SelfTest\SectionTrackerTests.cpp" />
<ClCompile Include="..\..\SelfTest\TrickyTests.cpp" />
<ClCompile Include="..\..\SelfTest\VariadicMacrosTests.cpp" />
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
</ClCompile>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="stdafx.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="targetver.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="stdafx.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\VariadicMacrosTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ExceptionTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ApproxTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\BDDTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ClassTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\CmdLineTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\ConditionTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\GeneratorTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests1.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageInstantiationTests2.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MessageTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\MiscTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\SectionTrackerTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\..\SelfTest\TrickyTests.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@ -0,0 +1,9 @@
// stdafx.cpp : source file that includes just the standard includes
// NativeTestCatch.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
// TODO: reference any additional headers you need in STDAFX.H
// and not in this file

View File

@ -0,0 +1,13 @@
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#pragma once
#include "targetver.h"
// Headers for CppUnitTest
#include "CppUnitTest.h"
// TODO: reference additional headers your program requires here

View File

@ -0,0 +1,8 @@
#pragma once
// Including SDKDDKVer.h defines the highest available Windows platform.
// If you wish to build your application for a previous Windows platform, include WinSDKVer.h and
// set the _WIN32_WINNT macro to the platform you wish to support before including SDKDDKVer.h.
#include <SDKDDKVer.h>