Bump to gtest 1.10.0
[platform/upstream/gtest.git] / googletest / test / gtest_premature_exit_test.cc
old mode 100755 (executable)
new mode 100644 (file)
similarity index 94%
rename from test/gtest_premature_exit_test.cc
rename to googletest/test/gtest_premature_exit_test.cc
index 3b4dc7d..1d1187e
@@ -26,8 +26,7 @@
 // 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 that Google Test manipulates the premature-exit-detection
 // file correctly.
@@ -46,7 +45,7 @@ namespace {
 
 class PrematureExitTest : public Test {
  public:
-  // Returns true iff the given file exists.
+  // Returns true if and only if the given file exists.
   static bool FileExists(const char* filepath) {
     StatStruct stat;
     return Stat(filepath, &stat) == 0;
@@ -57,12 +56,12 @@ class PrematureExitTest : public Test {
     premature_exit_file_path_ = GetEnv("TEST_PREMATURE_EXIT_FILE");
 
     // Normalize NULL to "" for ease of handling.
-    if (premature_exit_file_path_ == NULL) {
+    if (premature_exit_file_path_ == nullptr) {
       premature_exit_file_path_ = "";
     }
   }
 
-  // Returns true iff the premature-exit file exists.
+  // Returns true if and only if the premature-exit file exists.
   bool PrematureExitFileExists() const {
     return FileExists(premature_exit_file_path_);
   }
@@ -114,7 +113,7 @@ int main(int argc, char **argv) {
   // Test that the premature-exit file is deleted upon return from
   // RUN_ALL_TESTS().
   const char* const filepath = GetEnv("TEST_PREMATURE_EXIT_FILE");
-  if (filepath != NULL && *filepath != '\0') {
+  if (filepath != nullptr && *filepath != '\0') {
     if (PrematureExitTest::FileExists(filepath)) {
       printf(
           "File %s shouldn't exist after the test program finishes, but does.",