diff options
author | Tom Tromey <tom@tromey.com> | 2018-03-29 12:08:32 -0600 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2018-04-11 08:25:34 -0600 |
commit | 50146e7022cedafe615bfc9884358d291a00689f (patch) | |
tree | ee26240e58c36c6a89dc4a167bc54539d575beb6 /gdb/testsuite | |
parent | a8eb42a8b7d48ff6bd12ac83b0e31967b4f5abf1 (diff) | |
download | gdb-50146e7022cedafe615bfc9884358d291a00689f.zip gdb-50146e7022cedafe615bfc9884358d291a00689f.tar.gz gdb-50146e7022cedafe615bfc9884358d291a00689f.tar.bz2 |
Add Rust test case for ".." struct initializer
Building with --coverage pointed out that there was no Rust test for
initializing a structure using the ".." initializer. This patch adds
such a test.
Regression tested on x86-64 Fedora 26.
2018-04-11 Tom Tromey <tom@tromey.com>
* gdb.rust/simple.exp: Add test for ".." struct initializer.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.rust/simple.exp | 3 |
2 files changed, 7 insertions, 0 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5dd0553..d757198 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-04-11 Tom Tromey <tom@tromey.com> + + * gdb.rust/simple.exp: Add test for ".." struct initializer. + 2018-04-10 Pedro Alves <palves@redhat.com> * gdb.base/fork-running-state.c (fork_child): Don't exit if parent diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp index 2db596b..846abe1 100644 --- a/gdb/testsuite/gdb.rust/simple.exp +++ b/gdb/testsuite/gdb.rust/simple.exp @@ -169,6 +169,9 @@ gdb_test "print nosuchsymbol" \ gdb_test "print simple::HiBob{field1, field2}" \ " = simple::HiBob \\{field1: 77, field2: 88\\}" +gdb_test "print simple::HiBob{field1: 99, .. y}" \ + " = simple::HiBob \\{field1: 99, field2: 8\\}" + 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\\}" |