diff --git a/README b/README index ba4f6cfc..a3673d18 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -CATCH v0.9 build 2 (integration branch) +CATCH v0.9 build 3 (integration branch) --------------------------------------------- CATCH is an automated test framework for C, C++ and Objective-C. diff --git a/include/internal/catch_expression_lhs.hpp b/include/internal/catch_expression_lhs.hpp index 7ee8b2ef..edc5dd84 100644 --- a/include/internal/catch_expression_lhs.hpp +++ b/include/internal/catch_expression_lhs.hpp @@ -22,7 +22,7 @@ class ExpressionLhs { void operator = ( const ExpressionLhs& ); public: - ExpressionLhs( const T& lhs ) : m_lhs( lhs ) {} + ExpressionLhs( T lhs ) : m_lhs( lhs ) {} template ExpressionResultBuilder& operator == ( const RhsT& rhs ) { diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index 9c293e77..a8172af4 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -13,7 +13,7 @@ namespace Catch { // These numbers are maintained by a script - Version libraryVersion = { 0, 9, 2, "integration" }; + Version libraryVersion = { 0, 9, 3, "integration" }; } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED diff --git a/projects/SelfTest/ConditionTests.cpp b/projects/SelfTest/ConditionTests.cpp index 49c22282..e3e3dffe 100644 --- a/projects/SelfTest/ConditionTests.cpp +++ b/projects/SelfTest/ConditionTests.cpp @@ -226,6 +226,20 @@ TEST_CASE( "./succeeding/conditions//long_to_unsigned_x", REQUIRE( long_var == unsigned_long_var ); } +TEST_CASE( "./succeeding/conditions/const ints to int literal", + "comparisons between const int variables" ) +{ + const unsigned char unsigned_char_var = 1; + const unsigned short unsigned_short_var = 1; + const unsigned int unsigned_int_var = 1; + const unsigned long unsigned_long_var = 1L; + + REQUIRE( unsigned_char_var == 1 ); + REQUIRE( unsigned_short_var == 1 ); + REQUIRE( unsigned_int_var == 1 ); + REQUIRE( unsigned_long_var == 1 ); +} + TEST_CASE( "./succeeding/conditions/negative ints", "Comparisons between unsigned ints and negative signed ints match c++ standard behaviour" ) { diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index 128ece7c..9677e752 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -37,7 +37,7 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" SECTION( "selftest/test counts/succeeding tests", "Number of 'succeeding' tests is fixed" ) { Totals totals = runner.runMatching( "./succeeding/*" ); - CHECK( totals.assertions.passed == 289 ); + CHECK( totals.assertions.passed == 293 ); CHECK( totals.assertions.failed == 0 ); } diff --git a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj index f7ae405d..0376b843 100644 --- a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj +++ b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj @@ -554,8 +554,10 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++98"; CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; GCC_PREPROCESSOR_DEFINITIONS = ""; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = ( "-Weverything", @@ -568,8 +570,10 @@ isa = XCBuildConfiguration; buildSettings = { CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++98"; CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; GCC_PREPROCESSOR_DEFINITIONS = CATCH_CONFIG_USE_ANSI_COLOUR_CODES; + GCC_VERSION = com.apple.compilers.llvm.clang.1_0; PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = ( "-Weverything", diff --git a/single_include/catch.hpp b/single_include/catch.hpp index bade257f..8243c349 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v0.9 build 2 (integration branch) - * Generated: 2012-11-16 08:44:53.410120 + * CATCH v0.9 build 3 (integration branch) + * Generated: 2012-11-16 21:01:18.673384 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -939,7 +939,7 @@ class ExpressionLhs { void operator = ( const ExpressionLhs& ); public: - ExpressionLhs( const T& lhs ) : m_lhs( lhs ) {} + ExpressionLhs( T lhs ) : m_lhs( lhs ) {} template ExpressionResultBuilder& operator == ( const RhsT& rhs ) { @@ -5375,7 +5375,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion = { 0, 9, 2, "integration" }; + Version libraryVersion = { 0, 9, 3, "integration" }; } // #included from: ../reporters/catch_reporter_basic.hpp