check gdb.lookup_type return value in gdb.python/py-lookup-type.exp
authorJoel Brobecker <brobecker@adacore.com>
Wed, 21 Jan 2015 09:29:09 +0000 (10:29 +0100)
committerJoel Brobecker <brobecker@adacore.com>
Mon, 26 Jan 2015 04:41:37 +0000 (08:41 +0400)
This further improves this testcase to check the output of
our calls to gdb.lookup_type.

gdb/ChangeLog:

        * gdb.python/py-lookup-type.exp (test_lookup_type): Change
        the second test to print the name attribute of value
        returned by the call to gdb.lookup_type, and adjust
        the expected output accordingly.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-lookup-type.exp

index 68225825442fd0c64de3c5d4746022dcbed2d9da..1eb72dbed4d1c29a3b60a11783ea329af5e6cf9a 100644 (file)
@@ -1,3 +1,10 @@
+2015-01-26  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.python/py-lookup-type.exp (test_lookup_type): Change
+       the second test to print the name attribute of value
+       returned by the call to gdb.lookup_type, and adjust
+       the expected output accordingly.
+
 2015-01-25  Mark Wielaard  <mjw@redhat.com>
 
        * gdb.arch/i386-bp_permanent.c (standard): New declaration.
index d8fb9e7ae939e26996759490a43643b097aac416..46d6fc61e6f66861026064d49472f94f0f23bf6a 100644 (file)
@@ -32,7 +32,8 @@ if { [skip_python_tests] } { continue }
 
 proc test_lookup_type { lang type_name } {
     gdb_test_no_output "set language ${lang}"
-    gdb_test_no_output "python gdb.lookup_type('${type_name}')" \
+    gdb_test "python print(gdb.lookup_type('${type_name}').name)" \
+        "${type_name}" \
         "lookup type ${type_name} using language ${lang}"
 }