aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.java
diff options
context:
space:
mode:
authorDoug Evans <dje@google.com>2010-08-18 16:37:22 +0000
committerDoug Evans <dje@google.com>2010-08-18 16:37:22 +0000
commitf1208f9e0a164d55b91416876a5881321d3851b7 (patch)
tree7364282c587f13fd0221468eb38a33a399f11460 /gdb/testsuite/gdb.java
parent856d6f99ff9e391881377a4742520c1c405c694b (diff)
downloadgdb-f1208f9e0a164d55b91416876a5881321d3851b7.zip
gdb-f1208f9e0a164d55b91416876a5881321d3851b7.tar.gz
gdb-f1208f9e0a164d55b91416876a5881321d3851b7.tar.bz2
* gdb.base/call-ar-st.exp (set_lang_c): Delete, unused.
* gdb.base/callfuncs.exp (set_lang_c): Delete, set c language directly. * gdb.base/printcmds.exp (set_lang_c): Delete, set c language directly. Simplify, early exit if runto_main fails. * gdb.fortran/exprs.exp: load_lib fortran.exp. (set_lang_fortran): Moved to lib/fortran.exp. * gdb.fortran/types.exp: load_lib fortran.exp. (set_lang_fortran): Moved to lib/fortran.exp. * gdb.java/jmisc.exp (set_lang_java): Moved to lib/java.exp. * gdb.java/jprint.exp (set_lang_java): Ditto. * gdb.java/jv-exp.exp: load_lib java.exp. If set_lang_java fails, issue a warning instead of failure to be consistent with other set_lang_foo uses. (set_lang_java): Moved to lib/java.exp. * gdb.java/jv-print.exp (set_lang_java): Moved to lib/java.exp. If set_lang_java fails, issue a warning instead of failure to be consistent with other set_lang_foo uses. * gdb.pascal/types.exp: load_lib pascal.exp. (set_lang_pascal): Moved to lib/pascal.exp. * lib/fortran.exp: New file. * lib/java.exp (set_lang_java): New function. * lib/pascal.exp (set_lang_pascal): New function.
Diffstat (limited to 'gdb/testsuite/gdb.java')
-rw-r--r--gdb/testsuite/gdb.java/jmisc.exp19
-rw-r--r--gdb/testsuite/gdb.java/jprint.exp19
-rw-r--r--gdb/testsuite/gdb.java/jv-exp.exp19
-rw-r--r--gdb/testsuite/gdb.java/jv-print.exp19
4 files changed, 7 insertions, 69 deletions
diff --git a/gdb/testsuite/gdb.java/jmisc.exp b/gdb/testsuite/gdb.java/jmisc.exp
index b3292a3..0f66fd6 100644
--- a/gdb/testsuite/gdb.java/jmisc.exp
+++ b/gdb/testsuite/gdb.java/jmisc.exp
@@ -32,32 +32,17 @@ if {[compile_java_from_source ${srcfile} ${binfile} "-g"] != ""} {
continue
}
-# Set the current language to java. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_java {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- gdb_test_no_output "set language java"
-
- return [gdb_test "show language" ".* source language is \"java\".*" \
- "set language to \"java\""]
-}
-
# Start with a fresh gdb.
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
+gdb_load $binfile
gdb_test "set print sevenbit-strings" ".*"
-if ![set_lang_java] then {
+if [set_lang_java] then {
# Ref PR gdb:java/1565. Don't use the simpler "break jmisc.main".
# As of 2004-02-24 it wasn't working and is being tested separatly.
# Before GCJ 4.1 (approximately) the demangled name did not include
diff --git a/gdb/testsuite/gdb.java/jprint.exp b/gdb/testsuite/gdb.java/jprint.exp
index 18ff7ed..4317e15 100644
--- a/gdb/testsuite/gdb.java/jprint.exp
+++ b/gdb/testsuite/gdb.java/jprint.exp
@@ -31,32 +31,17 @@ if {[compile_java_from_source ${srcfile} ${binfile} "-g"] != ""} {
continue
}
-# Set the current language to java. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_java {} {
- global gdb_prompt
- global binfile objdir subdir
-
- verbose "loading file '$binfile'"
- gdb_load $binfile
-
- gdb_test_no_output "set language java"
-
- return [gdb_test "show language" ".* source language is \"java\".*" \
- "set language to \"java\""]
-}
-
# Start with a fresh gdb.
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir
+gdb_load $binfile
gdb_test "set print sevenbit-strings" ".*"
-if ![set_lang_java] then {
+if [set_lang_java] then {
# Ref PR gdb:java/1565. Don't use the simpler "break jmisc.main".
# As of 2004-02-24 it wasn't working and is being tested separatly.
# Before GCJ 4.1 (approximately) the demangled name did not include
diff --git a/gdb/testsuite/gdb.java/jv-exp.exp b/gdb/testsuite/gdb.java/jv-exp.exp
index 4f72dd4..6277385 100644
--- a/gdb/testsuite/gdb.java/jv-exp.exp
+++ b/gdb/testsuite/gdb.java/jv-exp.exp
@@ -17,22 +17,7 @@ if $tracelevel then {
strace $tracelevel
}
-
-# Set the current language to Java. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_java {} {
- global gdb_prompt
-
- if [gdb_test "set language java" "" "set language java"] {
- return 0
- }
-
- if [gdb_test "show language" ".* source language is \"java\".*"] {
- return 0
- }
- return 1;
-}
+load_lib "java.exp"
proc test_comparisons {} {
global gdb_prompt
@@ -56,5 +41,5 @@ gdb_test "set width 0" ""
if [set_lang_java] then {
test_comparisons
} else {
- fail "Java expression tests suppressed"
+ warning "Java expression tests suppressed"
}
diff --git a/gdb/testsuite/gdb.java/jv-print.exp b/gdb/testsuite/gdb.java/jv-print.exp
index a22d194..c78f7d7 100644
--- a/gdb/testsuite/gdb.java/jv-print.exp
+++ b/gdb/testsuite/gdb.java/jv-print.exp
@@ -21,23 +21,6 @@ load_lib "java.exp"
if { [skip_java_tests] } { continue }
-
-# Set the current language to Java. This counts as a test. If it
-# fails, then we skip the other tests.
-
-proc set_lang_java {} {
- global gdb_prompt
-
- if [gdb_test "set language java" "" "set language java"] {
- return 0
- }
-
- if [gdb_test "show language" ".* source language is \"java\".*"] {
- return 0
- }
- return 1;
-}
-
proc test_integer_literals_accepted {} {
global gdb_prompt
@@ -135,5 +118,5 @@ if [set_lang_java] then {
test_character_literals_accepted
test_integer_literals_rejected
} else {
- fail "Java print command tests suppressed"
+ warning "Java print command tests suppressed"
}