aboutsummaryrefslogtreecommitdiff
path: root/googletest/samples/sample4.cc
diff options
context:
space:
mode:
Diffstat (limited to 'googletest/samples/sample4.cc')
-rw-r--r--googletest/samples/sample4.cc14
1 files changed, 5 insertions, 9 deletions
diff --git a/googletest/samples/sample4.cc b/googletest/samples/sample4.cc
index b0ee6093..489c89b0 100644
--- a/googletest/samples/sample4.cc
+++ b/googletest/samples/sample4.cc
@@ -29,26 +29,22 @@
// A sample program demonstrating using Google C++ testing framework.
-#include <stdio.h>
-
#include "sample4.h"
+#include <stdio.h>
+
// Returns the current counter value, and increments it.
-int Counter::Increment() {
- return counter_++;
-}
+int Counter::Increment() { return counter_++; }
// Returns the current counter value, and decrements it.
// counter can not be less than 0, return 0 in this case
int Counter::Decrement() {
if (counter_ == 0) {
return counter_;
- } else {
+ } else {
return counter_--;
}
}
// Prints the current counter value to STDOUT.
-void Counter::Print() const {
- printf("%d", counter_);
-}
+void Counter::Print() const { printf("%d", counter_); }