summaryrefslogtreecommitdiffstats
path: root/harmony-tests/src/test/java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2013-11-26 18:27:10 +0000
committerNarayan Kamath <narayan@google.com>2013-11-26 18:27:50 +0000
commite0e5a7a0bb9c4412664807c8150e453c611cc4f7 (patch)
treea8c4bec929e8dced2c749d2186ede793e87670ec /harmony-tests/src/test/java
parentc510d99d32b57cd7d93ca2430b6e6fa3bbe6aa1f (diff)
downloadlibcore-e0e5a7a0bb9c4412664807c8150e453c611cc4f7.zip
libcore-e0e5a7a0bb9c4412664807c8150e453c611cc4f7.tar.gz
libcore-e0e5a7a0bb9c4412664807c8150e453c611cc4f7.tar.bz2
Fix a testcase in InputStreamReaderTest.
Fix path to test resource. bug: 11665359 Change-Id: Id360215499bc20620c096a3f0a4e85970e606c2b
Diffstat (limited to 'harmony-tests/src/test/java')
-rw-r--r--harmony-tests/src/test/java/org/apache/harmony/tests/java/io/InputStreamReaderTest.java16
1 files changed, 5 insertions, 11 deletions
diff --git a/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/InputStreamReaderTest.java b/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/InputStreamReaderTest.java
index 79a9f39..02294d7 100644
--- a/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/InputStreamReaderTest.java
+++ b/harmony-tests/src/test/java/org/apache/harmony/tests/java/io/InputStreamReaderTest.java
@@ -17,6 +17,7 @@
package org.apache.harmony.tests.java.io;
+import junit.framework.TestCase;
import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
@@ -24,7 +25,6 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStreamWriter;
-import java.io.PrintStream;
import java.io.UnsupportedEncodingException;
import java.nio.charset.Charset;
import java.nio.charset.CharsetDecoder;
@@ -32,8 +32,6 @@ import java.nio.charset.CodingErrorAction;
import java.nio.charset.MalformedInputException;
import java.util.Arrays;
-import junit.framework.TestCase;
-
public class InputStreamReaderTest extends TestCase {
static class LimitedByteArrayInputStream extends ByteArrayInputStream {
@@ -408,7 +406,7 @@ public class InputStreamReaderTest extends TestCase {
public void test_read_specialCharset() throws IOException {
reader.close();
in = this.getClass().getClassLoader().getResourceAsStream(
- "org/apache/harmony/luni/tests/java/io/testfile-utf8.txt");
+ "tests/api/java/io/testfile-utf8.txt");
reader = new InputStreamReader(in, "utf-8");
int c;
StringBuffer sb = new StringBuffer();
@@ -421,13 +419,9 @@ public class InputStreamReaderTest extends TestCase {
sb.setLength(0);
reader.close();
in = this.getClass().getClassLoader().getResourceAsStream(
- "org/apache/harmony/luni/tests/java/io/testfile.txt");
- try {
- reader = new InputStreamReader(in, "gb18030");
- } catch (UnsupportedEncodingException e) {
- System.out
- .println("GB18030 is not supported, abort test InputStreamReaderTest.testSpecialCharsetReading().");
- }
+ "tests/api/java/io/testfile.txt");
+
+ reader = new InputStreamReader(in, "gb18030");
while ((c = reader.read()) != -1) {
sb.append((char) c);
}