Modified the remaining test cases to display more meaningful assert messages.
Added a generic message generator to the lldbtest.py base module.


git-svn-id: https://llvm.org/svn/llvm-project/llvdb/trunk@110625 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/load_unload/TestLoadUnload.py b/test/load_unload/TestLoadUnload.py
index 620797a..65da301 100644
--- a/test/load_unload/TestLoadUnload.py
+++ b/test/load_unload/TestLoadUnload.py
@@ -5,9 +5,9 @@
 import os, time
 import unittest2
 import lldb
-import lldbtest
+from lldbtest import *
 
-class TestLoadUnload(lldbtest.TestBase):
+class TestLoadUnload(TestBase):
 
     mydir = "load_unload"
 
@@ -16,7 +16,7 @@
         res = self.res
         exe = os.path.join(os.getcwd(), "a.out")
         self.ci.HandleCommand("file " + exe, res)
-        self.assertTrue(res.Succeeded())
+        self.assertTrue(res.Succeeded(), CURRENT_EXECUTABLE_SET)
 
         # Break by function name a_function (not yet loaded).
         self.ci.HandleCommand("breakpoint set -n a_function", res)
@@ -24,25 +24,28 @@
         self.assertTrue(res.GetOutput().startswith(
             "Breakpoint created: 1: name = 'a_function', locations = 0 "
             "(pending)"
-            ))
+            ),
+                        BREAKPOINT_CREATED)
 
         self.ci.HandleCommand("run", res)
-        time.sleep(0.1)
-        self.assertTrue(res.Succeeded())
+        #time.sleep(0.1)
+        self.assertTrue(res.Succeeded(), RUN_STOPPED)
 
         # The stop reason of the thread should be breakpoint and at a_function.
         self.ci.HandleCommand("thread list", res)
         output = res.GetOutput()
-        self.assertTrue(res.Succeeded())
+        self.assertTrue(res.Succeeded(), CMD_MSG('thread list'))
         self.assertTrue(output.find('state is Stopped') > 0 and
                         output.find('a_function') > 0 and
                         output.find('a.c:14') > 0 and
-                        output.find('stop reason = breakpoint') > 0)
+                        output.find('stop reason = breakpoint') > 0,
+                        STOPPED_DUE_TO_BREAKPOINT)
 
         # The breakpoint should have a hit count of 1.
         self.ci.HandleCommand("breakpoint list", res)
         self.assertTrue(res.Succeeded())
-        self.assertTrue(res.GetOutput().find(' resolved, hit count = 1') > 0)
+        self.assertTrue(res.GetOutput().find(' resolved, hit count = 1') > 0,
+                        BREAKPOINT_HIT_ONCE)
 
         self.ci.HandleCommand("continue", res)
         self.assertTrue(res.Succeeded())