mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-01 12:55:40 +02:00
Suppressed a load of warnings
This commit is contained in:
@@ -58,6 +58,7 @@ namespace Catch {
|
||||
static void use( Code _colourCode );
|
||||
|
||||
private:
|
||||
Colour( Colour const& other );
|
||||
static Detail::IColourImpl* impl();
|
||||
};
|
||||
|
||||
|
@@ -55,6 +55,7 @@ namespace Catch {
|
||||
class ScopedMessage {
|
||||
public:
|
||||
ScopedMessage( MessageBuilder const& builder );
|
||||
ScopedMessage( ScopedMessage const& other );
|
||||
~ScopedMessage();
|
||||
|
||||
MessageInfo m_info;
|
||||
|
@@ -33,6 +33,10 @@ namespace Catch {
|
||||
m_info.message = builder.m_stream.str();
|
||||
getResultCapture().pushScopedMessage( m_info );
|
||||
}
|
||||
ScopedMessage::ScopedMessage( ScopedMessage const& other )
|
||||
: m_info( other.m_info )
|
||||
{}
|
||||
|
||||
ScopedMessage::~ScopedMessage() {
|
||||
getResultCapture().popScopedMessage( m_info );
|
||||
}
|
||||
|
@@ -17,6 +17,7 @@ namespace Catch {
|
||||
{
|
||||
public:
|
||||
NotImplementedException( SourceLineInfo const& lineInfo );
|
||||
NotImplementedException( NotImplementedException const& ) {}
|
||||
|
||||
virtual ~NotImplementedException() CATCH_NOEXCEPT {}
|
||||
|
||||
|
15
include/internal/catch_reenable_warnings.h
Normal file
15
include/internal/catch_reenable_warnings.h
Normal file
@@ -0,0 +1,15 @@
|
||||
/*
|
||||
* Copyright 2014 Two Blue Cubes Ltd
|
||||
*
|
||||
* 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_REENABLE_WARNINGS_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic pop
|
||||
#endif
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_REENABLE_WARNINGS_H_INCLUDED
|
21
include/internal/catch_suppress_warnings.h
Normal file
21
include/internal/catch_suppress_warnings.h
Normal file
@@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2014 Two Blue Cubes Ltd
|
||||
*
|
||||
* 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_SUPPRESS_WARNINGS_H_INCLUDED
|
||||
#define TWOBLUECUBES_CATCH_SUPPRESS_WARNINGS_H_INCLUDED
|
||||
|
||||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wglobal-constructors"
|
||||
#pragma clang diagnostic ignored "-Wvariadic-macros"
|
||||
#pragma clang diagnostic ignored "-Wc99-extensions"
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wpadded"
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat"
|
||||
#pragma clang diagnostic ignored "-Wc++98-compat-pedantic"
|
||||
#endif
|
||||
|
||||
#endif // TWOBLUECUBES_CATCH_SUPPRESS_WARNINGS_H_INCLUDED
|
@@ -66,26 +66,26 @@ namespace Catch {
|
||||
endElement();
|
||||
}
|
||||
|
||||
# ifndef CATCH_CPP11_OR_GREATER
|
||||
XmlWriter& operator = ( XmlWriter const& other ) {
|
||||
XmlWriter temp( other );
|
||||
swap( temp );
|
||||
return *this;
|
||||
}
|
||||
# else
|
||||
XmlWriter( XmlWriter const& ) = default;
|
||||
XmlWriter( XmlWriter && ) = default;
|
||||
XmlWriter& operator = ( XmlWriter const& ) = default;
|
||||
XmlWriter& operator = ( XmlWriter && ) = default;
|
||||
# endif
|
||||
|
||||
void swap( XmlWriter& other ) {
|
||||
std::swap( m_tagIsOpen, other.m_tagIsOpen );
|
||||
std::swap( m_needsNewline, other.m_needsNewline );
|
||||
std::swap( m_tags, other.m_tags );
|
||||
std::swap( m_indent, other.m_indent );
|
||||
std::swap( m_os, other.m_os );
|
||||
}
|
||||
//# ifndef CATCH_CPP11_OR_GREATER
|
||||
// XmlWriter& operator = ( XmlWriter const& other ) {
|
||||
// XmlWriter temp( other );
|
||||
// swap( temp );
|
||||
// return *this;
|
||||
// }
|
||||
//# else
|
||||
// XmlWriter( XmlWriter const& ) = default;
|
||||
// XmlWriter( XmlWriter && ) = default;
|
||||
// XmlWriter& operator = ( XmlWriter const& ) = default;
|
||||
// XmlWriter& operator = ( XmlWriter && ) = default;
|
||||
//# endif
|
||||
//
|
||||
// void swap( XmlWriter& other ) {
|
||||
// std::swap( m_tagIsOpen, other.m_tagIsOpen );
|
||||
// std::swap( m_needsNewline, other.m_needsNewline );
|
||||
// std::swap( m_tags, other.m_tags );
|
||||
// std::swap( m_indent, other.m_indent );
|
||||
// std::swap( m_os, other.m_os );
|
||||
// }
|
||||
|
||||
XmlWriter& startElement( std::string const& name ) {
|
||||
ensureTagClosed();
|
||||
@@ -163,7 +163,13 @@ namespace Catch {
|
||||
return *this;
|
||||
}
|
||||
|
||||
void setStream( std::ostream& os ) {
|
||||
m_os = &os;
|
||||
}
|
||||
|
||||
private:
|
||||
XmlWriter( XmlWriter const& );
|
||||
void operator=( XmlWriter const& );
|
||||
|
||||
std::ostream& stream() {
|
||||
return *m_os;
|
||||
|
Reference in New Issue
Block a user