Permalink
Browse files

Reformatting files with astyle.

I used the following options:

style=ansi
-s4
-p
-U
-H
-O
-o
-c
-j
  • Loading branch information...
1 parent 4808b92 commit ffa32195c1331cc2b55baff102c91ce079d5bb34 @whart222 whart222 committed Feb 4, 2012
Showing with 5,326 additions and 5,848 deletions.
  1. +39 −43 cxxtest/Descriptions.cpp
  2. +62 −66 cxxtest/Descriptions.h
  3. +44 −45 cxxtest/DummyDescriptions.cpp
  4. +59 −63 cxxtest/DummyDescriptions.h
  5. +234 −269 cxxtest/ErrorFormatter.h
  6. +23 −27 cxxtest/ErrorPrinter.h
  7. +13 −14 cxxtest/GlobalFixture.cpp
  8. +19 −21 cxxtest/GlobalFixture.h
  9. +139 −160 cxxtest/Gui.h
  10. +128 −153 cxxtest/LinkedList.cpp
  11. +50 −53 cxxtest/LinkedList.h
  12. +6 −8 cxxtest/MSVCErrorPrinter.h
  13. +2 −2 cxxtest/Mock.h
  14. +5 −7 cxxtest/ParenPrinter.h
  15. +202 −238 cxxtest/QtGui.h
  16. +226 −258 cxxtest/RealDescriptions.cpp
  17. +192 −204 cxxtest/RealDescriptions.h
  18. +24 −25 cxxtest/StdTestSuite.h
  19. +173 −200 cxxtest/StdValueTraits.h
  20. +20 −23 cxxtest/StdioFilePrinter.h
  21. +6 −8 cxxtest/StdioPrinter.h
  22. +147 −174 cxxtest/TeeListener.h
  23. +54 −56 cxxtest/TestListener.h
  24. +50 −52 cxxtest/TestMain.h
  25. +79 −91 cxxtest/TestRunner.h
  26. +171 −188 cxxtest/TestSuite.cpp
  27. +231 −238 cxxtest/TestSuite.h
  28. +184 −222 cxxtest/TestTracker.cpp
  29. +100 −102 cxxtest/TestTracker.h
  30. +118 −134 cxxtest/ValueTraits.cpp
  31. +277 −292 cxxtest/ValueTraits.h
  32. +421 −487 cxxtest/Win32Gui.h
  33. +268 −309 cxxtest/X11Gui.h
  34. +18 −22 cxxtest/XUnitPrinter.h
  35. +446 −490 cxxtest/XmlFormatter.h
  36. +25 −30 cxxtest/XmlPrinter.h
  37. +11 −15 cxxtest/YesNoRunner.h
  38. +5 −1 doc/Makefile
  39. +4 −4 doc/examples/MockTestSuite.h
  40. +19 −19 doc/examples/MyClass.h
  41. +10 −10 doc/examples/MyTestSuite10.h
  42. +10 −10 doc/examples/MyTestSuite11.h
  43. +7 −7 doc/examples/MyTestSuite3.h
  44. +8 −8 doc/examples/MyTestSuite6.h
  45. +23 −22 doc/examples/MyTestSuite7.h
  46. +2 −2 doc/examples/MyTestSuite8.h
  47. +14 −13 doc/examples/MyTestSuite9.h
  48. +19 −19 doc/examples/TMyClass.h
  49. +3 −0 doc/examples/cxxtestgen.out
  50. +1 −1 doc/examples/rand_example.cpp
  51. +4 −4 doc/examples/time_mock.h
  52. BIN doc/guide.epub
  53. +108 −103 doc/guide.html
  54. BIN doc/guide.pdf
  55. +7 −9 sample/CreatedTest.h
  56. +8 −11 sample/DeltaTest.h
  57. +14 −16 sample/EnumTraits.h
  58. +17 −22 sample/ExceptionTest.h
  59. +8 −12 sample/FixtureTest.h
  60. +8 −11 sample/MessageTest.h
  61. +24 −32 sample/SimpleTest.h
  62. +20 −26 sample/TraitsTest.h
  63. +5 −5 sample/gui/GreenYellowRed.h
  64. +1 −1 sample/mock/Dice.cpp
  65. +1 −1 sample/mock/Dice.h
  66. +6 −4 sample/mock/MockStdlib.h
  67. +15 −15 sample/mock/TestDice.h
  68. +3 −3 sample/mock/roll.cpp
  69. +1 −2 sample/yes_no_runner.cpp
  70. +18 −18 test/BadTest.h
  71. +1 −1 test/Comments.h
  72. +7 −7 test/Comments2.h
  73. +18 −18 test/CppTemplateTest.h
  74. +22 −22 test/DeepAbort.h
  75. +10 −6 test/DefaultTraits.h
  76. +4 −4 test/DoubleCall.h
  77. +15 −15 test/DynamicAbort.h
  78. +14 −12 test/DynamicMax.h
  79. +3 −3 test/EmptySuite.h
  80. +10 −10 test/Exceptions.h
  81. +18 −13 test/Factor.h
  82. +3 −3 test/ForceNoEh.h
  83. +2 −2 test/GfSetUpFails.h
  84. +2 −2 test/GfSetUpThrows.h
  85. +2 −2 test/GfTearDownFails.h
  86. +2 −2 test/GfTearDownThrows.h
  87. +1 −1 test/GlobalFixtures.h
  88. +28 −28 test/GoodSuite.h
  89. +1 −1 test/HaveStd.h
  90. +2 −2 test/IncludeTest.h
  91. +16 −16 test/InheritedTest.h
  92. +3 −3 test/Int64.h
  93. +7 −7 test/LessThanEquals.h
  94. +3 −3 test/LongLong.h
  95. +7 −7 test/LongTraits.h
  96. +56 −56 test/MockTest.h
  97. +2 −2 test/NoEh.h
  98. +1 −1 test/Part1.h
  99. +1 −1 test/Part2.h
  100. +15 −15 test/Relation.h
  101. +6 −5 test/SameData.h
  102. +6 −6 test/SameFiles.h
  103. +6 −6 test/SameFilesLonger.h
  104. +10 −8 test/SameZero.h
  105. +3 −3 test/SetUpWorldError.h
  106. +2 −2 test/SetUpWorldFails.h
  107. +2 −2 test/SetUpWorldThrows.h
  108. +20 −20 test/SimpleInheritedTest.h
  109. +15 −15 test/SimpleInheritedTest2.h
  110. +80 −80 test/StlTraits.h
  111. +1 −1 test/TearDownWorldFails.h
  112. +1 −1 test/TearDownWorldThrows.h
  113. +18 −15 test/TestNonFinite.h
  114. +1 −1 test/ThrowNoStd.h
  115. +45 −45 test/ThrowsAssert.h
  116. +27 −27 test/TraitsTest.h
  117. +26 −26 test/Tsm.h
  118. +9 −9 test/UserTraits.h
  119. +7 −7 test/VoidTraits.h
  120. +2 −2 test/WideCharTest.h
  121. +6 −6 test/WorldFixtures.h
  122. +27 −27 test/cxxtest/DummyGui.h
  123. +2 −1 test/fake/commctrl.h
  124. +2 −2 test/fake/qapplication.h
  125. +2 −2 test/fake/qlabel.h
  126. +2 −2 test/fake/qlayout.h
  127. +1 −1 test/fake/qmessagebox.h
  128. +5 −5 test/fake/qprogressbar.h
  129. +3 −3 test/fake/qstatusbar.h
  130. +4 −4 test/fake/qstring.h
  131. +4 −4 test/fake/qwidget.h
  132. +39 −38 test/fake/windows.h
  133. +6 −6 test/main.cpp
  134. +1 −1 test/unit/LinkedList_test.t.h
View
@@ -14,61 +14,57 @@
#include <cxxtest/Descriptions.h>
-namespace CxxTest
-{
- TestDescription::~TestDescription() {}
- SuiteDescription::~SuiteDescription() {}
- WorldDescription::~WorldDescription() {}
-
- //
- // Convert total tests to string
- //
+namespace CxxTest {
+TestDescription::~TestDescription() {}
+SuiteDescription::~SuiteDescription() {}
+WorldDescription::~WorldDescription() {}
+
+//
+// Convert total tests to string
+//
#ifndef _CXXTEST_FACTOR
- char *WorldDescription::strTotalTests( char *s ) const
- {
- numberToString( numTotalTests(), s );
- return s;
- }
+char *WorldDescription::strTotalTests(char *s) const {
+ numberToString(numTotalTests(), s);
+ return s;
+}
#else // _CXXTEST_FACTOR
- char *WorldDescription::strTotalTests( char *s ) const
- {
- char *p = numberToString( numTotalTests(), s );
+char *WorldDescription::strTotalTests(char *s) const {
+ char *p = numberToString(numTotalTests(), s);
- if ( numTotalTests() <= 1 ) {
- return s;
- }
+ if (numTotalTests() <= 1) {
+ return s;
+ }
- unsigned n = numTotalTests();
- unsigned numFactors = 0;
+ unsigned n = numTotalTests();
+ unsigned numFactors = 0;
- for ( unsigned factor = 2; (factor * factor) <= n; factor += (factor == 2) ? 1 : 2 ) {
- unsigned power;
+ for (unsigned factor = 2; (factor * factor) <= n; factor += (factor == 2) ? 1 : 2) {
+ unsigned power;
- for ( power = 0; (n % factor) == 0; n /= factor ) {
- ++ power;
- }
+ for (power = 0; (n % factor) == 0; n /= factor) {
+ ++ power;
+ }
- if ( !power ) {
- continue;
- }
+ if (!power) {
+ continue;
+ }
- p = numberToString( factor, copyString( p, (numFactors == 0) ? " = " : " * " ) );
- if ( power > 1 ) {
- p = numberToString( power, copyString( p, "^" ) );
- }
- ++ numFactors;
+ p = numberToString(factor, copyString(p, (numFactors == 0) ? " = " : " * "));
+ if (power > 1) {
+ p = numberToString(power, copyString(p, "^"));
}
+ ++ numFactors;
+ }
- if ( n > 1 ) {
- if ( !numFactors ) {
- copyString( p, tracker().failedTests() ? " :(" : tracker().warnings() ? " :|" : " :)" );
- }
- else {
- numberToString( n, copyString( p, " * " ) );
- }
+ if (n > 1) {
+ if (!numFactors) {
+ copyString(p, tracker().failedTests() ? " :(" : tracker().warnings() ? " :|" : " :)");
+ } else {
+ numberToString(n, copyString(p, " * "));
}
- return s;
}
+ return s;
+}
#endif // _CXXTEST_FACTOR
}
View
@@ -19,72 +19,68 @@
#include <cxxtest/LinkedList.h>
-namespace CxxTest
-{
- class TestSuite;
-
- class TestDescription : public Link
- {
- public:
- virtual ~TestDescription();
-
- virtual const char *file() const = 0;
- virtual int line() const = 0;
- virtual const char *testName() const = 0;
- virtual const char *suiteName() const = 0;
-
- virtual void run() = 0;
- virtual bool setUp() = 0;
- virtual bool tearDown() = 0;
-
- virtual const TestDescription *next() const = 0;
- virtual TestDescription *next() = 0;
- };
-
- class SuiteDescription : public Link
- {
- public:
- virtual ~SuiteDescription();
-
- virtual const char *file() const = 0;
- virtual int line() const = 0;
- virtual const char *suiteName() const = 0;
- virtual TestSuite *suite() const = 0;
-
- virtual unsigned numTests() const = 0;
- virtual const TestDescription &testDescription( unsigned /*i*/ ) const = 0;
-
- virtual TestDescription *firstTest() = 0;
- virtual const TestDescription *firstTest() const = 0;
- virtual SuiteDescription *next() = 0;
- virtual const SuiteDescription *next() const = 0;
-
- virtual void activateAllTests() = 0;
- virtual bool leaveOnly( const char * /*testName*/ ) = 0;
-
- virtual bool setUp() = 0;
- virtual bool tearDown() = 0;
- };
-
- class WorldDescription : public Link
- {
- public:
- virtual ~WorldDescription();
-
- virtual const char *worldName() const { return "cxxtest"; }
- virtual unsigned numSuites( void ) const = 0;
- virtual unsigned numTotalTests( void ) const = 0;
- virtual const SuiteDescription &suiteDescription( unsigned /*i*/ ) const = 0;
-
- enum { MAX_STRLEN_TOTAL_TESTS = 32 };
- char *strTotalTests( char * /*buffer*/ ) const;
-
- virtual SuiteDescription *firstSuite() = 0;
- virtual const SuiteDescription *firstSuite() const = 0;
-
- virtual void activateAllTests() = 0;
- virtual bool leaveOnly( const char * /*suiteName*/, const char * /*testName*/ = 0 ) = 0;
- };
+namespace CxxTest {
+class TestSuite;
+
+class TestDescription : public Link {
+public:
+ virtual ~TestDescription();
+
+ virtual const char *file() const = 0;
+ virtual int line() const = 0;
+ virtual const char *testName() const = 0;
+ virtual const char *suiteName() const = 0;
+
+ virtual void run() = 0;
+ virtual bool setUp() = 0;
+ virtual bool tearDown() = 0;
+
+ virtual const TestDescription *next() const = 0;
+ virtual TestDescription *next() = 0;
+};
+
+class SuiteDescription : public Link {
+public:
+ virtual ~SuiteDescription();
+
+ virtual const char *file() const = 0;
+ virtual int line() const = 0;
+ virtual const char *suiteName() const = 0;
+ virtual TestSuite *suite() const = 0;
+
+ virtual unsigned numTests() const = 0;
+ virtual const TestDescription &testDescription(unsigned /*i*/) const = 0;
+
+ virtual TestDescription *firstTest() = 0;
+ virtual const TestDescription *firstTest() const = 0;
+ virtual SuiteDescription *next() = 0;
+ virtual const SuiteDescription *next() const = 0;
+
+ virtual void activateAllTests() = 0;
+ virtual bool leaveOnly(const char * /*testName*/) = 0;
+
+ virtual bool setUp() = 0;
+ virtual bool tearDown() = 0;
+};
+
+class WorldDescription : public Link {
+public:
+ virtual ~WorldDescription();
+
+ virtual const char *worldName() const { return "cxxtest"; }
+ virtual unsigned numSuites(void) const = 0;
+ virtual unsigned numTotalTests(void) const = 0;
+ virtual const SuiteDescription &suiteDescription(unsigned /*i*/) const = 0;
+
+ enum { MAX_STRLEN_TOTAL_TESTS = 32 };
+ char *strTotalTests(char * /*buffer*/) const;
+
+ virtual SuiteDescription *firstSuite() = 0;
+ virtual const SuiteDescription *firstSuite() const = 0;
+
+ virtual void activateAllTests() = 0;
+ virtual bool leaveOnly(const char * /*suiteName*/, const char * /*testName*/ = 0) = 0;
+};
}
#endif // __cxxtest__Descriptions_h__
@@ -11,50 +11,49 @@
#include <cxxtest/DummyDescriptions.h>
-namespace CxxTest
-{
- DummyTestDescription::DummyTestDescription() {}
-
- const char *DummyTestDescription::file() const { return "<no file>"; }
- int DummyTestDescription::line() const { return 0; }
- const char *DummyTestDescription::testName() const { return "<no test>"; }
- const char *DummyTestDescription::suiteName() const { return "<no suite>"; }
- bool DummyTestDescription::setUp() { return true;}
- void DummyTestDescription::run() {}
- bool DummyTestDescription::tearDown() { return true;}
-
- TestDescription *DummyTestDescription::next() { return 0; }
- const TestDescription *DummyTestDescription::next() const { return 0; }
-
- DummySuiteDescription::DummySuiteDescription() : _test() {}
-
- const char *DummySuiteDescription::file() const { return "<no file>"; }
- int DummySuiteDescription::line() const { return 0; }
- const char *DummySuiteDescription::suiteName() const { return "<no suite>"; }
- TestSuite *DummySuiteDescription::suite() const { return 0; }
- unsigned DummySuiteDescription::numTests() const { return 0; }
- const TestDescription &DummySuiteDescription::testDescription( unsigned ) const { return _test; }
- SuiteDescription *DummySuiteDescription::next() { return 0; }
- TestDescription *DummySuiteDescription::firstTest() { return 0; }
- const SuiteDescription *DummySuiteDescription::next() const { return 0; }
- const TestDescription *DummySuiteDescription::firstTest() const { return 0; }
- void DummySuiteDescription::activateAllTests() {}
- bool DummySuiteDescription::leaveOnly( const char * /*testName*/ ) { return false; }
-
- bool DummySuiteDescription::setUp() { return true;}
- bool DummySuiteDescription::tearDown() { return true;}
-
- DummyWorldDescription::DummyWorldDescription() : _suite() {}
-
- unsigned DummyWorldDescription::numSuites( void ) const { return 0; }
- unsigned DummyWorldDescription::numTotalTests( void ) const { return 0; }
- const SuiteDescription &DummyWorldDescription::suiteDescription( unsigned ) const { return _suite; }
- SuiteDescription *DummyWorldDescription::firstSuite() { return 0; }
- const SuiteDescription *DummyWorldDescription::firstSuite() const { return 0; }
- void DummyWorldDescription::activateAllTests() {}
- bool DummyWorldDescription::leaveOnly( const char * /*suiteName*/, const char * /*testName*/ ) { return false; }
-
- bool DummyWorldDescription::setUp() { return true;}
- bool DummyWorldDescription::tearDown() { return true;}
+namespace CxxTest {
+DummyTestDescription::DummyTestDescription() {}
+
+const char *DummyTestDescription::file() const { return "<no file>"; }
+int DummyTestDescription::line() const { return 0; }
+const char *DummyTestDescription::testName() const { return "<no test>"; }
+const char *DummyTestDescription::suiteName() const { return "<no suite>"; }
+bool DummyTestDescription::setUp() { return true;}
+void DummyTestDescription::run() {}
+bool DummyTestDescription::tearDown() { return true;}
+
+TestDescription *DummyTestDescription::next() { return 0; }
+const TestDescription *DummyTestDescription::next() const { return 0; }
+
+DummySuiteDescription::DummySuiteDescription() : _test() {}
+
+const char *DummySuiteDescription::file() const { return "<no file>"; }
+int DummySuiteDescription::line() const { return 0; }
+const char *DummySuiteDescription::suiteName() const { return "<no suite>"; }
+TestSuite *DummySuiteDescription::suite() const { return 0; }
+unsigned DummySuiteDescription::numTests() const { return 0; }
+const TestDescription &DummySuiteDescription::testDescription(unsigned) const { return _test; }
+SuiteDescription *DummySuiteDescription::next() { return 0; }
+TestDescription *DummySuiteDescription::firstTest() { return 0; }
+const SuiteDescription *DummySuiteDescription::next() const { return 0; }
+const TestDescription *DummySuiteDescription::firstTest() const { return 0; }
+void DummySuiteDescription::activateAllTests() {}
+bool DummySuiteDescription::leaveOnly(const char * /*testName*/) { return false; }
+
+bool DummySuiteDescription::setUp() { return true;}
+bool DummySuiteDescription::tearDown() { return true;}
+
+DummyWorldDescription::DummyWorldDescription() : _suite() {}
+
+unsigned DummyWorldDescription::numSuites(void) const { return 0; }
+unsigned DummyWorldDescription::numTotalTests(void) const { return 0; }
+const SuiteDescription &DummyWorldDescription::suiteDescription(unsigned) const { return _suite; }
+SuiteDescription *DummyWorldDescription::firstSuite() { return 0; }
+const SuiteDescription *DummyWorldDescription::firstSuite() const { return 0; }
+void DummyWorldDescription::activateAllTests() {}
+bool DummyWorldDescription::leaveOnly(const char * /*suiteName*/, const char * /*testName*/) { return false; }
+
+bool DummyWorldDescription::setUp() { return true;}
+bool DummyWorldDescription::tearDown() { return true;}
}
Oops, something went wrong.

0 comments on commit ffa3219

Please sign in to comment.