aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog4
-rw-r--r--gdb/testsuite/gdb.rust/simple.exp4
2 files changed, 7 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 19cb7dc..ebeecf9 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,7 @@
+2016-10-29 Manish Goregaokar <manish@mozilla.com>
+
+ * gdb.rust/simple.exp: Add tests for `sizeof(expr)`
+
2016-10-27 Manish Goregaokar <manish@mozilla.com>
* gdb.rust/simple.rs: Add test for univariant enums without discriminants
diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp
index 8e84daa..4b9a979 100644
--- a/gdb/testsuite/gdb.rust/simple.exp
+++ b/gdb/testsuite/gdb.rust/simple.exp
@@ -33,6 +33,7 @@ if {![runto ${srcfile}:$line]} {
gdb_test "print a" " = \\(\\)"
gdb_test "ptype a" " = \\(\\)"
+gdb_test "print sizeof(a)" " = 0"
gdb_test "print b" " = \\\[\\\]"
gdb_test "ptype b" " = \\\[i32; 0\\\]"
@@ -41,6 +42,7 @@ gdb_test "print *(&b as *const \[i32; 0_0\])" " = \\\[\\\]"
gdb_test "print c" " = 99"
gdb_test "ptype c" " = i32"
+gdb_test "print sizeof(c)" " = 4"
gdb_test "print c = 87" " = \\(\\)"
gdb_test "print c" " = 87"
@@ -127,7 +129,7 @@ gdb_test "print nosuchsymbol" \
gdb_test "print e" " = simple::MoreComplicated::Two\\(73\\)"
gdb_test "print e2" \
" = simple::MoreComplicated::Four\\{this: true, is: 8, a: 109 'm', struct_: 100, variant: 10\\}"
-
+gdb_test "print sizeof(e)" " = 24"
gdb_test_sequence "ptype e" "" {
" = enum simple::MoreComplicated \\{"
" One,"