1 package test.net.sourceforge.pmd.ast;
2
3 import junit.framework.TestCase;
4 import net.sourceforge.pmd.PMD;
5
6 import java.io.ByteArrayInputStream;
7 import java.io.InputStreamReader;
8
9 public class EncodingTest extends TestCase {
10
11 public void testDecodingOfUTF8() throws Throwable {
12
13
14 String encoding = "UTF-8";
15
16 String code = new String(TEST_UTF8.getBytes(), encoding);
17 InputStreamReader isr = new InputStreamReader(new ByteArrayInputStream(code.getBytes()));
18
19
20
21
22
23
24 }
25
26 private static final String TEST_UTF8 =
27 "class Foo {" + PMD.EOL +
28 " void é() {}" + PMD.EOL +
29 " void fiddle() {}" + PMD.EOL +
30 "}";
31 }