diff options
Diffstat (limited to 'src/tests/org/anarres/cpp/JavaFileSystemTestCase.java')
-rw-r--r-- | src/tests/org/anarres/cpp/JavaFileSystemTestCase.java | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/src/tests/org/anarres/cpp/JavaFileSystemTestCase.java b/src/tests/org/anarres/cpp/JavaFileSystemTestCase.java deleted file mode 100644 index 4f68d68..0000000 --- a/src/tests/org/anarres/cpp/JavaFileSystemTestCase.java +++ /dev/null @@ -1,39 +0,0 @@ -package org.anarres.cpp; - -import java.io.*; - -import junit.framework.Test; - -import static org.anarres.cpp.Token.*; - -public class JavaFileSystemTestCase extends BaseTestCase { - - public void testJavaFileSystem() throws Exception { - JavaFileSystem fs = new JavaFileSystem(); - VirtualFile f; - - /* Anyone who has this file on their Unix box is messed up. */ - f = fs.getFile("/foo/bar baz"); - try { - f.getSource(); /* drop on floor */ - assertTrue("Got a source for a non-file", f.isFile()); - } - catch (FileNotFoundException e) { - assertFalse("Got no source for a file", f.isFile()); - } - - /* We hope we have this. */ - f = fs.getFile("/usr/include/stdio.h"); - try { - f.getSource(); /* drop on floor */ - System.out.println("Opened stdio.h"); - assertTrue("Got a source for a non-file", f.isFile()); - } - catch (FileNotFoundException e) { - System.out.println("Failed to open stdio.h"); - assertFalse("Got no source for a file", f.isFile()); - } - - } - -} |