From: Tom Tromey Date: Thu, 29 Mar 2018 18:08:32 +0000 (-0600) Subject: Add Rust test case for ".." struct initializer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=50146e7022cedafe615bfc9884358d291a00689f;p=binutils-gdb.git 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 * gdb.rust/simple.exp: Add test for ".." struct initializer. --- diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 5dd055385d7..d7571985dc6 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2018-04-11 Tom Tromey + + * gdb.rust/simple.exp: Add test for ".." struct initializer. + 2018-04-10 Pedro Alves * 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 2db596b9329..846abe11a4d 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\\}"