aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/class2.exp
diff options
context:
space:
mode:
authorJoel Brobecker <brobecker@gnat.com>2004-02-26 20:22:44 +0000
committerJoel Brobecker <brobecker@gnat.com>2004-02-26 20:22:44 +0000
commit98f9cd2d31788e025ca3e07f4fce5c09c68f2801 (patch)
treefc4761e9174d4b4ddc6f5f34b8016e56227781a8 /gdb/testsuite/gdb.cp/class2.exp
parent9b50c11b36020a71b97e57d4ff10a4d45855967a (diff)
downloadfsf-binutils-gdb-98f9cd2d31788e025ca3e07f4fce5c09c68f2801.zip
fsf-binutils-gdb-98f9cd2d31788e025ca3e07f4fce5c09c68f2801.tar.gz
fsf-binutils-gdb-98f9cd2d31788e025ca3e07f4fce5c09c68f2801.tar.bz2
* gdb.cp/class2.cc (empty): New class.
(refer): New function. (main): Declare an object of type empty and use it. * gdb.cp/class2.exp: Print the value of an object of type empty.
Diffstat (limited to 'gdb/testsuite/gdb.cp/class2.exp')
-rw-r--r--gdb/testsuite/gdb.cp/class2.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.cp/class2.exp b/gdb/testsuite/gdb.cp/class2.exp
index 9d55345..e3f63b0 100644
--- a/gdb/testsuite/gdb.cp/class2.exp
+++ b/gdb/testsuite/gdb.cp/class2.exp
@@ -1,4 +1,4 @@
-# Copyright 2003 Free Software Foundation, Inc.
+# Copyright 2003, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -113,3 +113,7 @@ gdb_test_multiple "print * abp" "print * abp at marker return 0, s-p-o off" {
gdb_test "print * (B *) abp" \
"= {.*a1 = 200.*b1 = 201.*b2 = 202}" \
"print * (B *) abp at marker return 0"
+
+# Printing the value of an object containing no data fields:
+
+gdb_test "p e" "= \{<No data fields>\}" "print object with no data fields"