Bump to gtest 1.10.0
[platform/upstream/gtest.git] / googletest / test / gtest_environment_test.cc
old mode 100755 (executable)
new mode 100644 (file)
similarity index 96%
rename from test/gtest_environment_test.cc
rename to googletest/test/gtest_environment_test.cc
index 3cff19e..064bfc5
 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-//
-// Author: wan@google.com (Zhanyong Wan)
+
 //
 // Tests using global test environments.
 
 #include <stdlib.h>
 #include <stdio.h>
 #include "gtest/gtest.h"
-
-#define GTEST_IMPLEMENTATION_ 1  // Required for the next #include.
 #include "src/gtest-internal-inl.h"
-#undef GTEST_IMPLEMENTATION_
 
 namespace testing {
 GTEST_DECLARE_string_(filter);
@@ -57,7 +53,7 @@ class MyEnvironment : public testing::Environment {
   // Depending on the value of failure_in_set_up_, SetUp() will
   // generate a non-fatal failure, generate a fatal failure, or
   // succeed.
-  virtual void SetUp() {
+  void SetUp() override {
     set_up_was_run_ = true;
 
     switch (failure_in_set_up_) {
@@ -73,7 +69,7 @@ class MyEnvironment : public testing::Environment {
   }
 
   // Generates a non-fatal failure.
-  virtual void TearDown() {
+  void TearDown() override {
     tear_down_was_run_ = true;
     ADD_FAILURE() << "Expected non-fatal failure in global tear-down.";
   }
@@ -120,7 +116,7 @@ void Check(bool condition, const char* msg) {
   }
 }
 
-// Runs the tests.  Return true iff successful.
+// Runs the tests.  Return true if and only if successful.
 //
 // The 'failure' parameter specifies the type of failure that should
 // be generated by the global set-up.