summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lldb/test/array_types/TestArrayTypes.py26
-rw-r--r--lldb/test/class_types/TestClassTypes.py6
-rw-r--r--lldb/test/function_types/TestFunctionTypes.py12
-rw-r--r--lldb/test/global_variables/TestGlobalVariables.py18
4 files changed, 31 insertions, 31 deletions
diff --git a/lldb/test/array_types/TestArrayTypes.py b/lldb/test/array_types/TestArrayTypes.py
index 35a75204814..277da9a65c5 100644
--- a/lldb/test/array_types/TestArrayTypes.py
+++ b/lldb/test/array_types/TestArrayTypes.py
@@ -30,13 +30,13 @@ class TestArrayTypes(lldbtest.TestBase):
self.ci.HandleCommand("thread list", res)
print "thread list ->", res.GetOutput()
self.assertTrue(res.Succeeded())
- self.assertTrue(res.GetOutput().find('state is Stopped') and
- res.GetOutput().find('stop reason = breakpoint'))
+ self.assertTrue(res.GetOutput().find('state is Stopped') > 0 and
+ res.GetOutput().find('stop reason = breakpoint') > 0)
# 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'))
+ self.assertTrue(res.GetOutput().find('resolved, hit count = 1') > 0)
# Issue 'variable list' command on several array-type variables.
@@ -44,19 +44,19 @@ class TestArrayTypes(lldbtest.TestBase):
self.assertTrue(res.Succeeded())
output = res.GetOutput()
self.assertTrue(output.startswith('(char *[4])') and
- output.find('(char *) strings[0]') and
- output.find('(char *) strings[1]') and
- output.find('(char *) strings[2]') and
- output.find('(char *) strings[3]') and
- output.find('Hello') and
- output.find('Hola') and
- output.find('Bonjour') and
- output.find('Guten Tag'))
+ output.find('(char *) strings[0]') > 0 and
+ output.find('(char *) strings[1]') > 0 and
+ output.find('(char *) strings[2]') > 0 and
+ output.find('(char *) strings[3]') > 0 and
+ output.find('Hello') > 0 and
+ output.find('Hola') > 0 and
+ output.find('Bonjour') > 0 and
+ output.find('Guten Tag') > 0)
self.ci.HandleCommand("variable list char_16", res);
self.assertTrue(res.Succeeded())
- self.assertTrue(res.GetOutput().find('(char) char_16[0]') and
- res.GetOutput().find('(char) char_16[15]'))
+ self.assertTrue(res.GetOutput().find('(char) char_16[0]') > 0 and
+ res.GetOutput().find('(char) char_16[15]') > 0)
self.ci.HandleCommand("variable list ushort_matrix", res);
self.assertTrue(res.Succeeded())
diff --git a/lldb/test/class_types/TestClassTypes.py b/lldb/test/class_types/TestClassTypes.py
index 74ba30b7c0b..689216c62b3 100644
--- a/lldb/test/class_types/TestClassTypes.py
+++ b/lldb/test/class_types/TestClassTypes.py
@@ -30,13 +30,13 @@ class TestClassTypes(lldbtest.TestBase):
self.ci.HandleCommand("thread list", res)
print "thread list ->", res.GetOutput()
self.assertTrue(res.Succeeded())
- self.assertTrue(res.GetOutput().find('state is Stopped') and
- res.GetOutput().find('stop reason = breakpoint'))
+ self.assertTrue(res.GetOutput().find('state is Stopped') > 0 and
+ res.GetOutput().find('stop reason = breakpoint') > 0)
# 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'))
+ self.assertTrue(res.GetOutput().find(' resolved, hit count = 1') > 0)
# We should be stopped on the ctor function of class C.
self.ci.HandleCommand("variable list this", res);
diff --git a/lldb/test/function_types/TestFunctionTypes.py b/lldb/test/function_types/TestFunctionTypes.py
index 79d47d2765b..5025d486544 100644
--- a/lldb/test/function_types/TestFunctionTypes.py
+++ b/lldb/test/function_types/TestFunctionTypes.py
@@ -30,13 +30,13 @@ class TestClassTypes(lldbtest.TestBase):
self.ci.HandleCommand("thread list", res)
print "thread list ->", res.GetOutput()
self.assertTrue(res.Succeeded())
- self.assertTrue(res.GetOutput().find('state is Stopped') and
- res.GetOutput().find('stop reason = breakpoint'))
+ self.assertTrue(res.GetOutput().find('state is Stopped') > 0 and
+ res.GetOutput().find('stop reason = breakpoint') > 0)
# 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'))
+ self.assertTrue(res.GetOutput().find(' resolved, hit count = 1') > 0)
# Check that the 'callback' variable display properly.
self.ci.HandleCommand("variable list callback", res);
@@ -55,9 +55,9 @@ class TestClassTypes(lldbtest.TestBase):
self.assertTrue(res.Succeeded())
output = res.GetOutput()
#print "process status =", output
- self.assertTrue(output.find('where = a.out`string_not_empty') and
- output.find('main.c:12') and
- output.find('stop reason = breakpoint'))
+ self.assertTrue(output.find('where = a.out`string_not_empty') > 0 and
+ output.find('main.c:12') > 0 and
+ output.find('stop reason = breakpoint') > 0)
self.ci.HandleCommand("continue", res)
self.assertTrue(res.Succeeded())
diff --git a/lldb/test/global_variables/TestGlobalVariables.py b/lldb/test/global_variables/TestGlobalVariables.py
index 3b3009035f0..854a1b7ba24 100644
--- a/lldb/test/global_variables/TestGlobalVariables.py
+++ b/lldb/test/global_variables/TestGlobalVariables.py
@@ -30,24 +30,24 @@ class TestClassTypes(lldbtest.TestBase):
self.ci.HandleCommand("thread list", res)
print "thread list ->", res.GetOutput()
self.assertTrue(res.Succeeded())
- self.assertTrue(res.GetOutput().find('state is Stopped') and
- res.GetOutput().find('stop reason = breakpoint'))
+ self.assertTrue(res.GetOutput().find('state is Stopped') > 0 and
+ res.GetOutput().find('stop reason = breakpoint') > 0)
# 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'))
+ self.assertTrue(res.GetOutput().find(' resolved, hit count = 1') > 0)
# Check that GLOBAL scopes are indicated for the variables.
self.ci.HandleCommand("variable list -s -a", res);
self.assertTrue(res.Succeeded())
output = res.GetOutput()
- self.assertTrue(output.find('GLOBAL: g_file_static_cstr') and
- output.find('g_file_static_cstr') and
- output.find('GLOBAL: g_file_global_int') and
- output.find('(int) 42') and
- output.find('GLOBAL: g_file_global_cstr') and
- output.find('g_file_global_cstr'))
+ self.assertTrue(output.find('GLOBAL: g_file_static_cstr') > 0 and
+ output.find('g_file_static_cstr') > 0 and
+ output.find('GLOBAL: g_file_global_int') > 0 and
+ output.find('(int) 42') > 0 and
+ output.find('GLOBAL: g_file_global_cstr') > 0 and
+ output.find('g_file_global_cstr') > 0)
self.ci.HandleCommand("continue", res)
self.assertTrue(res.Succeeded())
OpenPOWER on IntegriCloud