GDB copyright headers update after running GDB's copyright.py script.
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / arithmet.exp
index 3ebbb5837522b4c4800b28a35e78e9d90ba6135b..1915ef03f35824af503f52de7c44d61e1aedda56 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 1998, 1999, 2001, 2007, 2008 Free Software Foundation, Inc.
+# Copyright 1998-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
@@ -13,9 +13,6 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Please email any bugs, comments, and/or additions to this file to:
-# bug-gdb@prep.ai.mit.edu
-
 # This file was written by Elena Zannoni (ezannoni@cygnus.com)
 # Rewritten to use gdb_test by Michael Chastain (chastain@redhat.com)
 
 # with integer type variables
 # 
 
-if $tracelevel then {
-       strace $tracelevel
-       }
-
 #
 # test running programs
 #
-set prms_id 0
-set bug_id 0
 
-set testfile "int-type"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile int-type.c
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
-     untested arithmet.exp
-     return -1
-    }
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+if {[prepare_for_testing $testfile.exp $testfile $srcfile {debug nowarnings}]} {
+    untested $testfile.exp
+    return -1
+}
 
 
 #
@@ -63,10 +47,10 @@ if ![runto_main] then {
 # test expressions with "int" types
 #
 
-gdb_test "set variable x=14" ""
-gdb_test "set variable y=2"  ""
-gdb_test "set variable z=2"  ""
-gdb_test "set variable w=3"  ""
+gdb_test_no_output "set variable x=14"
+gdb_test_no_output "set variable y=2"
+gdb_test_no_output "set variable z=2"
+gdb_test_no_output "set variable w=3"
 
 gdb_test "print x" "14"
 gdb_test "print y"  "2"
@@ -92,8 +76,8 @@ gdb_test "print x%y%z"  "0"
 
 # test precedence rules on pairs of arithmetic operators
 
-gdb_test "set variable x=10" ""
-gdb_test "set variable y=4"  ""
+gdb_test_no_output "set variable x=10"
+gdb_test_no_output "set variable y=4"
 
 #  x  y  z  w
 # 10  4  2  3
This page took 0.028836 seconds and 4 git commands to generate.