diff options
author | Tom Tromey <tromey@adacore.com> | 2019-02-26 12:12:30 -0700 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2019-02-26 12:13:26 -0700 |
commit | 8791793caa9a3186d4922cc786b6344e6093be73 (patch) | |
tree | 7a3d113fb01a78061b9a7389ef710b22540cc6a6 | |
parent | af54ade989cbbb1a43f4bc9d4d2e8e60814306f1 (diff) | |
download | gdb-8791793caa9a3186d4922cc786b6344e6093be73.zip gdb-8791793caa9a3186d4922cc786b6344e6093be73.tar.gz gdb-8791793caa9a3186d4922cc786b6344e6093be73.tar.bz2 |
Fix new py-value.exp test case
The new test case in py-value.exp fails -- the code was changed to
throw ValueError, but the test still checks for TypeError. This patch
fixes the problem.
I'm checking this in. Tested on x86-64 Fedora 29.
gdb/testsuite/ChangeLog
2019-02-26 Tom Tromey <tromey@adacore.com>
* gdb.python/py-value.exp (test_value_from_buffer): Check for
ValueError, not TypeError.
-rw-r--r-- | gdb/testsuite/ChangeLog | 5 | ||||
-rw-r--r-- | gdb/testsuite/gdb.python/py-value.exp | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cb51bcb..693fc15 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2019-02-26 Tom Tromey <tromey@adacore.com> + + * gdb.python/py-value.exp (test_value_from_buffer): Check for + ValueError, not TypeError. + 2019-02-26 Kevin Buettner <kevinb@redhat.com> * gdb.python/py-value.exp (test_value_from_buffer): New proc with diff --git a/gdb/testsuite/gdb.python/py-value.exp b/gdb/testsuite/gdb.python/py-value.exp index d42aff9..b3d90b5 100644 --- a/gdb/testsuite/gdb.python/py-value.exp +++ b/gdb/testsuite/gdb.python/py-value.exp @@ -530,7 +530,7 @@ proc test_value_from_buffer {} { gdb_test "python v=gdb.Value(b\[2*size_a0:\],tp); print(v)" "3" \ "convert 3rd elem of buffer to value" gdb_test "python v=gdb.Value(b\[2*size_a0+1:\],tp); print(v)" \ - "TypeError: Size of type is larger than that of buffer object\..*" \ + "ValueError: Size of type is larger than that of buffer object\..*" \ "attempt to convert smaller buffer than size of type" gdb_py_test_silent_cmd "python atp=tp.array(2) ; print(atp)" \ "make array type" 0 |