diff options
| author | Phil Nash | 2012-05-09 08:17:51 +0100 |
|---|---|---|
| committer | Phil Nash | 2012-05-09 08:17:51 +0100 |
| commit | d06dcedfdccda5d7177089202cb6a44f42f1ea42 (patch) | |
| tree | 5bbf70617b6214e07405656d7a7125910e96d529 /projects | |
| parent | e83f8397412e024853998df3cb5ec1c8430c7e75 (diff) | |
| download | catch3-d06dcedfdccda5d7177089202cb6a44f42f1ea42.tar.gz | |
Some more reformatting.
Also fixed some warnings
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/SelfTest/ConditionTests.cpp | 2 | ||||
| -rw-r--r-- | projects/SelfTest/GeneratorTests.cpp | 6 | ||||
| -rw-r--r-- | projects/SelfTest/TestMain.cpp | 2 | ||||
| -rw-r--r-- | projects/SelfTest/TrickyTests.cpp | 2 | ||||
| -rw-r--r-- | projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj | 2 |
5 files changed, 8 insertions, 6 deletions
diff --git a/projects/SelfTest/ConditionTests.cpp b/projects/SelfTest/ConditionTests.cpp index e9a8f685..41ce392d 100644 --- a/projects/SelfTest/ConditionTests.cpp +++ b/projects/SelfTest/ConditionTests.cpp @@ -247,7 +247,7 @@ TEST_CASE( "./succeeding/conditions/ptr", REQUIRE( returnsNull() == NULL ); REQUIRE( returnsConstNull() == NULL ); -// REQUIRE( NULL != p ); // gives warning, but should compile and run ok + REQUIRE( NULL != p ); } // Not (!) tests diff --git a/projects/SelfTest/GeneratorTests.cpp b/projects/SelfTest/GeneratorTests.cpp index 522e3f2c..2f8fec84 100644 --- a/projects/SelfTest/GeneratorTests.cpp +++ b/projects/SelfTest/GeneratorTests.cpp @@ -12,7 +12,7 @@ #include "catch.hpp" -inline size_t multiply( size_t a, size_t b ) +inline int multiply( int a, int b ) { return a*b; } @@ -21,8 +21,8 @@ TEST_CASE( "./succeeding/generators/1", "Generators over two ranges" ) { using namespace Catch::Generators; - size_t i = GENERATE( between( 1, 5 ).then( values( 15, 20, 21 ).then( 36 ) ) ); - size_t j = GENERATE( between( 100, 107 ) ); + int i = GENERATE( between( 1, 5 ).then( values( 15, 20, 21 ).then( 36 ) ) ); + int j = GENERATE( between( 100, 107 ) ); REQUIRE( multiply( i, 2 ) == i*2 ); REQUIRE( multiply( j, 2 ) == j*2 ); diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index 48932dca..97bdb6a2 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -43,7 +43,7 @@ TEST_CASE( "selftest/main", "Runs all Catch self tests and checks their results" "Number of 'succeeding' tests is fixed" ) { runner.runMatching( "./succeeding/*" ); - CHECK( runner.getTotals().assertions.passed == 275 ); + CHECK( runner.getTotals().assertions.passed == 276 ); CHECK( runner.getTotals().assertions.failed == 0 ); } diff --git a/projects/SelfTest/TrickyTests.cpp b/projects/SelfTest/TrickyTests.cpp index b5b72a42..bcfe9b03 100644 --- a/projects/SelfTest/TrickyTests.cpp +++ b/projects/SelfTest/TrickyTests.cpp @@ -209,7 +209,7 @@ namespace ObjectWithNonConstEqualityOperator TEST_CASE("./succeeding/non-const==", "Demonstrate that a non-const == is not used") { Test t( 1 ); - REQUIRE( t == 1 ); + REQUIRE( t == 1u ); } } diff --git a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj index d879996a..79f9ccd0 100644 --- a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj +++ b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj @@ -292,6 +292,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; COPY_PHASE_STRIP = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; @@ -318,6 +319,7 @@ buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_WARN_IMPLICIT_SIGN_CONVERSION = YES; COPY_PHASE_STRIP = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; GCC_C_LANGUAGE_STANDARD = gnu99; |