Move Rust union tests to new file
authorTom Tromey <tromey@adacore.com>
Wed, 1 Apr 2020 20:02:08 +0000 (14:02 -0600)
committerTom Tromey <tromey@adacore.com>
Wed, 1 Apr 2020 20:08:17 +0000 (14:08 -0600)
commit3d1cfd43bec7c22928d12ab235151b8eeeaf4e96
treeaae801032f76ea5e17654d5c128daceed23bf246
parente033dfa92f844849cc528649eee24d2b0b3f22e5
Move Rust union tests to new file

I wanted to run the gdb.rust tests against older versions of the Rust
compiler, to ensure that changes I am making don't break debugging
when using older compilers.

However, this did not work because simple.rs now uses unchecked
unions, which were only added in Rust 1.19.

This patch splits the union code into its own file, so that simple.exp
can continue to work.  I tested this with selected rust versions back
to 1.12.

gdb/testsuite/ChangeLog
2020-04-01  Tom Tromey  <tromey@adacore.com>

* gdb.rust/union.rs: New file.
* gdb.rust/union.exp: New file.
* gdb.rust/simple.rs (Union, Union2): Move to union.rs.
(main): Update.
* gdb.rust/simple.exp: Move union tests to union.exp.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.rust/simple.exp
gdb/testsuite/gdb.rust/simple.rs
gdb/testsuite/gdb.rust/union.exp [new file with mode: 0644]
gdb/testsuite/gdb.rust/union.rs [new file with mode: 0644]