1 | void testTabInLiteralInComment() {↵ | | 1 | void tearDown() {↵
|
2 | executeTarget("testTabInLiteralInComment");↵ | | 2 | executeTarget("↵
|
3 | }↵ | | |
|
|
4 | // not used, but public so theoretically must remain for BC?↵ | | 3 | cleanup");↵
|
| | | 4 | }↵
|
5 | public void assertEqualContent(File expect, File result)↵ | | 5 | public void assertEqualContent(File expect, File result)↵
|
6 | throws AssertionFailedError, IOException {↵ | | 6 | throws AssertionFailedError, IOException {↵
|
7 | if (!result.exists()) {↵ | | 7 | if (!result.exists()) {↵
|
8 | fail("Expected file "+result+" doesn\'t exist");↵ | | 8 | fail("Expected file "+result+" doesn\'t exist");↵
|
9 | }↵ | | 9 | }↵
|
|
10 | InputStream inExpect = null;↵ | | 10 | InputStream inExpect = null;↵
|
11 | InputStream inResult = null;↵ | | 11 | InputStream inResult = null;↵
|
12 | try {↵ | | 12 | try {↵
|
13 | inExpect = new BufferedInputStream(new FileInputStream(expect));↵ | | 13 | inExpect = new BufferedInputStream(new FileInputStream(expect));↵
|
14 | inResult = new BufferedInputStream(new FileInputStream(result));↵ | | 14 | inResult = new BufferedInputStream(new FileInputStream(result));↵
|
|
15 | int expectedByte = inExpect.read();↵ | | 15 | int expectedByte = inExpect.read();↵
|
16 | while (expectedByte != -1) {↵ | | 16 | while (expectedByte != -1) {↵
|
17 | assertEquals(expectedByte, inResult.read());↵ | | 17 | assertEquals(expectedByte, inResult.read());↵
|
18 | expectedByte = inExpect.read();↵ | | 18 | expectedByte = inExpect.read();↵
|
19 | }↵ | | 19 | }↵
|
20 | assertEquals("End of file", -1, inResult.read());↵ | | 20 | assertEquals("End of file", -1, inResult.read());↵
|
21 | } finally {↵ | | 21 | } finally {↵
|
22 | if (inResult != null) {↵ | | 22 | if (inResult != null) {↵
|
23 | inResult.close();↵ | | 23 | inResult.close();↵
|
24 | }↵ | | 24 | }↵
|
25 | if (inExpect != null) {↵ | | 25 | if (inExpect != null) {↵
|
26 | inExpect.close();↵ | | 26 | inExpect.close();↵
|
27 | }↵ | | 27 | }↵
|
28 | }↵ | | 28 | }↵
|
29 | | | 29 |
|