amccarth updated this revision to Diff 45023.
amccarth added a comment.

Used the more explicit assertion methods.


http://reviews.llvm.org/D16237

Files:
  packages/Python/lldbsuite/test/logging/TestLogging.py

Index: packages/Python/lldbsuite/test/logging/TestLogging.py
===================================================================
--- packages/Python/lldbsuite/test/logging/TestLogging.py
+++ packages/Python/lldbsuite/test/logging/TestLogging.py
@@ -61,7 +61,7 @@
         f.close ()
         os.remove (log_file)
 
-        self.assertTrue(log_lines > 0, "Something was written to the log 
file.")
+        self.assertGreater(len(log_lines), 0, "Something was written to the 
log file.")
 
     # Check that lldb truncates its log files
     @no_debug_info_test
@@ -83,7 +83,7 @@
             contents = f.read ()
 
         # check that it got removed
-        self.assertTrue(string.find(contents, "bacon") == -1)
+        self.assertEquals(contents.find("bacon"), -1)
 
     # Check that lldb can append to a log file
     @no_debug_info_test
@@ -104,4 +104,4 @@
             contents = f.read ()
 
         # check that it is still there
-        self.assertTrue(string.find(contents, "bacon") == 0)
+        self.assertEquals(contents.find("bacon"), 0)


Index: packages/Python/lldbsuite/test/logging/TestLogging.py
===================================================================
--- packages/Python/lldbsuite/test/logging/TestLogging.py
+++ packages/Python/lldbsuite/test/logging/TestLogging.py
@@ -61,7 +61,7 @@
         f.close ()
         os.remove (log_file)
 
-        self.assertTrue(log_lines > 0, "Something was written to the log file.")
+        self.assertGreater(len(log_lines), 0, "Something was written to the log file.")
 
     # Check that lldb truncates its log files
     @no_debug_info_test
@@ -83,7 +83,7 @@
             contents = f.read ()
 
         # check that it got removed
-        self.assertTrue(string.find(contents, "bacon") == -1)
+        self.assertEquals(contents.find("bacon"), -1)
 
     # Check that lldb can append to a log file
     @no_debug_info_test
@@ -104,4 +104,4 @@
             contents = f.read ()
 
         # check that it is still there
-        self.assertTrue(string.find(contents, "bacon") == 0)
+        self.assertEquals(contents.find("bacon"), 0)
_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to