Change preprocessor indent rules.

This commit is contained in:
Patrick Johnmeyer 2016-01-29 22:22:37 -06:00
parent b47b4f7e85
commit f82c403768
19 changed files with 115 additions and 113 deletions

View file

@ -19,7 +19,9 @@ public:
UnitTest::CurrentTest::Results() = &newResults;
if (newDetails != NULL)
{
UnitTest::CurrentTest::Details() = newDetails;
}
}
~ScopedCurrentTest()

View file

@ -21,7 +21,7 @@ namespace {
CHECK(!Detail::AssertExpected());
}
#ifndef UNITTEST_NO_EXCEPTIONS
#ifndef UNITTEST_NO_EXCEPTIONS
TEST(ReportAssertThrowsAssertException)
{
@ -107,7 +107,7 @@ namespace {
Detail::ExpectAssert(false);
}
#else
#else
TEST(SetAssertJumpTargetReturnsFalseWhenSettingJumpTarget)
{
@ -128,6 +128,6 @@ namespace {
CHECK(set == false);
}
#endif
#endif
}

View file

@ -12,13 +12,13 @@ namespace UnitTest
namespace
{
#ifndef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
#ifndef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
MemoryOutStream& operator <<(MemoryOutStream& lhs, const std::string& rhs)
{
lhs << rhs.c_str();
return lhs;
}
#endif
#endif
struct MockDeferredTestReporter : public DeferredTestReporter
{

View file

@ -170,60 +170,60 @@ namespace {
TEST(StreamingLongLongWritesCorrectCharacters)
{
MemoryOutStream stream;
#ifdef UNITTEST_COMPILER_IS_MSVC6
#ifdef UNITTEST_COMPILER_IS_MSVC6
stream << (__int64)-12345i64;
#else
#else
stream << (long long)-12345ll;
#endif
#endif
CHECK_EQUAL("-12345", stream.GetText());
}
#ifdef LLONG_MAX
#ifdef LLONG_MAX
TEST(StreamingMaxLongLongWritesCorrectCharacters)
{
MemoryOutStream stream;
stream << (long long)LLONG_MAX;
CHECK_EQUAL(maxSignedIntegralStr(sizeof(long long)), stream.GetText());
}
#endif
#endif
#ifdef LLONG_MIN
#ifdef LLONG_MIN
TEST(StreamingMinLongLongWritesCorrectCharacters)
{
MemoryOutStream stream;
stream << (long long)LLONG_MIN;
CHECK_EQUAL(minSignedIntegralStr(sizeof(long long)), stream.GetText());
}
#endif
#endif
TEST(StreamingUnsignedLongLongWritesCorrectCharacters)
{
MemoryOutStream stream;
#ifdef UNITTEST_COMPILER_IS_MSVC6
#ifdef UNITTEST_COMPILER_IS_MSVC6
stream << (unsigned __int64)85899ui64;
#else
#else
stream << (unsigned long long)85899ull;
#endif
#endif
CHECK_EQUAL("85899", stream.GetText());
}
#ifdef ULLONG_MAX
#ifdef ULLONG_MAX
TEST(StreamingMaxUnsignedLongLongWritesCorrectCharacters)
{
MemoryOutStream stream;
stream << (unsigned long long)ULLONG_MAX;
CHECK_EQUAL(maxUnsignedIntegralStr(sizeof(unsigned long long)), stream.GetText());
}
#endif
#endif
TEST(StreamingMinUnsignedLongLongWritesCorrectCharacters)
{
MemoryOutStream stream;
#ifdef UNITTEST_COMPILER_IS_MSVC6
#ifdef UNITTEST_COMPILER_IS_MSVC6
stream << (unsigned __int64)0ui64;
#else
#else
stream << (unsigned long long)0ull;
#endif
#endif
CHECK_EQUAL("0", stream.GetText());
}
@ -265,7 +265,7 @@ namespace {
CHECK_EQUAL("", stream.GetText());
}
#ifndef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
#ifndef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
TEST(StreamInitialCapacityIsCorrect)
{
@ -331,6 +331,6 @@ namespace {
CHECK(true);
}
#endif
#endif
}

View file

@ -50,7 +50,7 @@ namespace {
CHECK_EQUAL(1, results.GetFailureCount());
}
#ifndef UNITTEST_NO_EXCEPTIONS
#ifndef UNITTEST_NO_EXCEPTIONS
TEST(ThrowingTestsAreReportedAsFailures)
{
class CrashingTest : public Test
@ -72,9 +72,9 @@ namespace {
CHECK_EQUAL(1, results.GetFailureCount());
}
#if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32)
#if !defined(UNITTEST_MINGW) && !defined(UNITTEST_WIN32)
// Skip this test in debug because some debuggers don't like it.
#if defined(NDEBUG)
#if defined(NDEBUG)
TEST(CrashingTestsAreReportedAsFailures)
{
class CrashingTest : public Test
@ -96,9 +96,9 @@ namespace {
CHECK_EQUAL(1, results.GetFailureCount());
}
#endif
#endif
#endif
#endif
#endif
#endif
TEST(TestWithUnspecifiedSuiteGetsDefaultSuite)
{

View file

@ -55,7 +55,7 @@ namespace {
CHECK(list1.GetHead()->m_nextTest == 0);
}
#ifndef UNITTEST_NO_EXCEPTIONS
#ifndef UNITTEST_NO_EXCEPTIONS
struct ThrowingThingie
{
@ -86,7 +86,7 @@ namespace {
CHECK(strstr(reporter.lastFailedMessage, "ThrowingThingie"));
}
#endif
#endif
struct DummyFixture
{
@ -134,7 +134,7 @@ namespace {
CHECK_EQUAL ("DefaultSuite", macroTestList2.GetHead()->m_details.suiteName);
}
#ifndef UNITTEST_NO_EXCEPTIONS
#ifndef UNITTEST_NO_EXCEPTIONS
struct FixtureCtorThrows
{
@ -218,7 +218,7 @@ namespace {
CHECK(strstr(reporter.lastFailedMessage, "assert failure"));
}
#endif
#endif
}

View file

@ -44,7 +44,7 @@ namespace {
CHECK_ARRAY_CLOSE(a1, a2, 3, 0.1f);
}
#ifndef UNITTEST_NO_EXCEPTIONS
#ifndef UNITTEST_NO_EXCEPTIONS
TEST(CheckThrowMacroSucceedsOnCorrectException)
{
@ -106,7 +106,7 @@ namespace {
CHECK_EQUAL(1, results.GetFailureCount());
}
#endif
#endif
struct SimpleFixture
{

View file

@ -12,7 +12,7 @@ using std::ostringstream;
namespace
{
#ifndef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
#ifndef UNITTEST_MEMORYOUTSTREAM_IS_STD_OSTRINGSTREAM
// Overload to let MemoryOutStream accept std::string
MemoryOutStream& operator<<(MemoryOutStream& s, const std::string& value)
@ -21,7 +21,7 @@ namespace
return s;
}
#endif
#endif
struct XmlTestReporterFixture
{