]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Fix CompileExpression print tests
authorKeith Seitz <keiths@redhat.com>
Tue, 15 Nov 2016 16:50:22 +0000 (08:50 -0800)
committerKeith Seitz <keiths@redhat.com>
Tue, 10 Jan 2017 19:38:24 +0000 (11:38 -0800)
gdb/testsuite/gdb.compile/cp-simple-anonymous.exp
gdb/testsuite/lib/compiler-support.exp

index 34b6e82441975f1250fbddbb15e2a073f1b411b6..8822187c8684c75a070c93659248226b5fa21337 100644 (file)
@@ -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"
index a81bafa519b8ad7c5fe4b329b5daefa45b970aa6..97d0b5fc9ee8772bada553e9d12990998f0ce8b1 100644 (file)
@@ -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
                }