testsuite: Introduce gdb_assert
authorPedro Alves <palves@redhat.com>
Mon, 14 Jul 2014 18:55:31 +0000 (19:55 +0100)
committerPedro Alves <palves@redhat.com>
Mon, 14 Jul 2014 19:30:41 +0000 (20:30 +0100)
commitbd29394088b5685d336a501fadca88b25ed777bc
tree2b8d810c13fb9cc90d48ef9cea307033152e3739
parent9d1e69a21488cb5b8b7553c8df18ee5c3f4d82e3
testsuite: Introduce gdb_assert

Often we'll do something like:

    if {$ok} {
fail "whatever"
    } else {
pass "whatever"
    }

This adds a helper procedure for that, and converts one random place
to use it, as an example.

2014-07-14  Pedro Alves  <palves@redhat.com>

* lib/gdb.exp (gdb_assert): New procedure.
* gdb.trace/backtrace.exp (gdb_backtrace_tdp_4): Use it.
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.trace/backtrace.exp
gdb/testsuite/lib/gdb.exp