diff options
author | Tom Tromey <tom@tromey.com> | 2020-12-31 14:55:27 -0700 |
---|---|---|
committer | Tom Tromey <tom@tromey.com> | 2020-12-31 14:55:27 -0700 |
commit | 9b243007ba0701c7ae07dc11d0f4a0c81b1bc49f (patch) | |
tree | 372e91bf24554745f2e413298ea2e95de399b88a /gdb | |
parent | cab3f4da68672647cde72bc0c06ec08977819817 (diff) | |
download | gdb-9b243007ba0701c7ae07dc11d0f4a0c81b1bc49f.zip gdb-9b243007ba0701c7ae07dc11d0f4a0c81b1bc49f.tar.gz gdb-9b243007ba0701c7ae07dc11d0f4a0c81b1bc49f.tar.bz2 |
Update gdb.rust tests for Rust 1.49
Rust 1.49 was released today, and it includes some library changes
which caused some gdb.rust tests to fail. This patch adapts the test
suite to the new output. I also verified that this continues to work
with Rust 1.48.
gdb/testsuite/ChangeLog
2020-12-31 Tom Tromey <tom@tromey.com>
* gdb.rust/simple.exp: Update output for Rust 1.49.
Diffstat (limited to 'gdb')
-rw-r--r-- | gdb/testsuite/ChangeLog | 4 | ||||
-rw-r--r-- | gdb/testsuite/gdb.rust/simple.exp | 14 |
2 files changed, 14 insertions, 4 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index c61fab8..d184b78 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,7 @@ +2020-12-31 Tom Tromey <tom@tromey.com> + + * gdb.rust/simple.exp: Update output for Rust 1.49. + 2020-12-31 Bernd Edlinger <bernd.edlinger@hotmail.de> * gdb.cp/step-and-next-inline.exp: Fix test case. diff --git a/gdb/testsuite/gdb.rust/simple.exp b/gdb/testsuite/gdb.rust/simple.exp index 882c2e0..00f4547 100644 --- a/gdb/testsuite/gdb.rust/simple.exp +++ b/gdb/testsuite/gdb.rust/simple.exp @@ -262,8 +262,14 @@ gdb_test_multiple "print str_none" "" { gdb_test "print int_some" " = core::option::Option<u8>::Some\\(1\\)" gdb_test "print int_none" " = core::option::Option<u8>::None" -gdb_test "print box_some" " = core::option::Option<\[a-z:\]*Box<u8>>::Some\\(.*\\)" -gdb_test "print box_none" " = core::option::Option<\[a-z:\]*Box<u8>>::None" +# The result expressions are a bit lax here, to handle the fact that +# the output varies between Rust versions. Mostly we just want to +# check for the presence "Option", "Box", "u8", and either "Some" or +# "None". +gdb_test "print box_some" \ + " = core::option::Option<\[a-z:\]*Box<u8.*>>::Some\\(.*\\)" +gdb_test "print box_none" \ + " = core::option::Option<\[a-z:\]*Box<u8.*>>::None" set pass_pattern \ " = simple::NonZeroOptimized::Value\\(\[a-z\]+::string::String .*" @@ -332,11 +338,11 @@ gdb_test "print (1)" " = 1" gdb_test "print 23..97.0" "Range expression with different types" gdb_test "print (*parametrized.next.val)" \ - " = simple::ParametrizedStruct<i32> {next: simple::ParametrizedEnum<\[a-z:\]*Box<simple::ParametrizedStruct<i32>>>::Empty, value: 1}" + " = simple::ParametrizedStruct<i32> {next: simple::ParametrizedEnum<\[a-z:\]*Box<simple::ParametrizedStruct<i32>.*>>::Empty, value: 1}" gdb_test "print parametrized.next.val" \ " = \\(\\*mut simple::ParametrizedStruct<i32>\\) $hex" gdb_test "print parametrized" \ - " = simple::ParametrizedStruct<i32> \\{next: simple::ParametrizedEnum<\[a-z:\]*Box<simple::ParametrizedStruct<i32>>>::Val\\{val: $hex\\}, value: 0\\}" + " = simple::ParametrizedStruct<i32> \\{next: simple::ParametrizedEnum<\[a-z:\]*Box<simple::ParametrizedStruct<i32>.*>>::Val\\{val: $hex\\}, value: 0\\}" gdb_test_sequence "ptype/o SimpleLayout" "" { "/\\* offset | size \\*/ type = struct simple::SimpleLayout {" |