From: Keith Seitz Date: Tue, 15 Nov 2016 16:50:22 +0000 (-0800) Subject: Fix CompileExpression print tests X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da24d1c3998bad8188f63ca080edc942997d2fa7;p=thirdparty%2Fbinutils-gdb.git Fix CompileExpression print tests --- diff --git a/gdb/testsuite/gdb.compile/cp-simple-anonymous.exp b/gdb/testsuite/gdb.compile/cp-simple-anonymous.exp index 34b6e824419..8822187c868 100644 --- a/gdb/testsuite/gdb.compile/cp-simple-anonymous.exp +++ b/gdb/testsuite/gdb.compile/cp-simple-anonymous.exp @@ -1,4 +1,4 @@ -# Copyright 2015 Free Software Foundation, Inc. +# Copyright 2015-2016 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -45,13 +45,13 @@ gdb_continue_to_breakpoint "testing location" # Reminder, "var" is an integer; all these types get converted to `int'. CompileExpression::new "var" CompileExpression::add_imp "anon_e" 3 -CompileExpression::add_imp "anon_u.aa" 97 +CompileExpression::add_imp "anon_u.aa" {97( 'a')?} CompileExpression::add_imp "anon_s.len" 11 CompileExpression::add_imp "a.u.b" 0 CompileExpression::add_imp "a.s.len" 5 CompileExpression::add_imp "a.e" 10 -CompileExpression::add_imp "(*anon_s.ptr == 'a')" 1 -CompileExpression::add_imp "(*a.s.ptr != 'h')" 0 +CompileExpression::add_imp "(*anon_s.ptr == 'a')" (1|true) +CompileExpression::add_imp "(*a.s.ptr != 'h')" (0|false) CompileExpression::add_imp "A::BB" 11 CompileExpression::run_tests "code" #CompileExpression::run_tests "print" diff --git a/gdb/testsuite/lib/compiler-support.exp b/gdb/testsuite/lib/compiler-support.exp index a81bafa519b..97d0b5fc9ee 100644 --- a/gdb/testsuite/lib/compiler-support.exp +++ b/gdb/testsuite/lib/compiler-support.exp @@ -170,7 +170,7 @@ namespace eval ::CompileExpression { foreach exp_test $expr_list_ { set exp [lindex $exp_test 0] - set result [string_to_regexp [lindex $exp_test 1]] + set result [lindex $exp_test 1] set is_explicit [lindex $exp_test 2] set tst [lindex $exp_test 3] set fail_list [lindex $exp_test 4] @@ -185,7 +185,7 @@ namespace eval ::CompileExpression { } if {[string match $cmd "print"]} { - if {!$is_expilcit} { + if {!$is_explicit} { eval setup_failures_ $fail_print gdb_test "compile print $exp" $result $tst }