-# Copyright 1998, 1999, 2001, 2007, 2008, 2009, 2010
-# 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
# 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}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
- untested arithmet.exp
- return -1
- }
+standard_testfile int-type.c
-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
+}
#
# 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"
# 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