summaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authormark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-04 13:24:40 +0000
committermark <mark@138bc75d-0d04-0410-961f-82ee72b054a4>2002-05-04 13:24:40 +0000
commit105563020a205661d1d8793ee4c6f8ccb4e2bc24 (patch)
tree24c5c14e8153940587752676b26ffc05f63e31ff /libjava
parentfef8467d23b6a978c1e10bedc5d621b9144b8cbe (diff)
downloadgcc-105563020a205661d1d8793ee4c6f8ccb4e2bc24.tar.gz
For PR java/6519:
* libjava.lang/emptystring.java: New. * libjava.lang/emptystring.out: New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53157 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libjava')
-rw-r--r--libjava/testsuite/ChangeLog6
-rw-r--r--libjava/testsuite/libjava.lang/emptystring.java15
-rw-r--r--libjava/testsuite/libjava.lang/emptystring.out4
3 files changed, 25 insertions, 0 deletions
diff --git a/libjava/testsuite/ChangeLog b/libjava/testsuite/ChangeLog
index c6af713af17..1d50f97bfeb 100644
--- a/libjava/testsuite/ChangeLog
+++ b/libjava/testsuite/ChangeLog
@@ -1,3 +1,9 @@
+2002-05-04 Mark Wielaard <mark@klomp.org>
+
+ For PR java/6519:
+ * libjava.lang/emptystring.java: New.
+ * libjava.lang/emptystring.out: New.
+
2002-04-21 Mark Wielaard <mark@klomp.org>
* libjava.mauve/xfail: Expect failures for PR java/6391 and
diff --git a/libjava/testsuite/libjava.lang/emptystring.java b/libjava/testsuite/libjava.lang/emptystring.java
new file mode 100644
index 00000000000..9da2ead72f6
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/emptystring.java
@@ -0,0 +1,15 @@
+public class emptystring
+{
+ public static void main(String[] args)
+ {
+ System.out.println("null".equals(n(0) + ""));
+ System.out.println("null".equals("" + n(0)));
+ System.out.println("x".equals(n(1) + ""));
+ System.out.println("x".equals("" + n(1)));
+ }
+
+ static String n(int i)
+ {
+ if (i==0) return null; else return "x";
+ }
+}
diff --git a/libjava/testsuite/libjava.lang/emptystring.out b/libjava/testsuite/libjava.lang/emptystring.out
new file mode 100644
index 00000000000..1140ff52e2b
--- /dev/null
+++ b/libjava/testsuite/libjava.lang/emptystring.out
@@ -0,0 +1,4 @@
+true
+true
+true
+true