Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Overbey2012-06-08 15:20:58 +0000
committerJeffrey Overbey2012-06-08 15:20:58 +0000
commit406ffc9f03989cca0e3ccb31633a3fde06404c1f (patch)
tree24233308f5b3f5a964c80ccbb649aee73b743431
parent4bbe12afede95aa6fe4684d512863e2b737df248 (diff)
downloadorg.eclipse.photran-406ffc9f03989cca0e3ccb31633a3fde06404c1f.tar.gz
org.eclipse.photran-406ffc9f03989cca0e3ccb31633a3fde06404c1f.tar.xz
org.eclipse.photran-406ffc9f03989cca0e3ccb31633a3fde06404c1f.zip
Fixed 7 unit tests that fail under Windows due to CRLF/LF differences
-rw-r--r--org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/basic-include-main.f772
-rw-r--r--org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/no-include.f772
-rw-r--r--org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test1-two-includes-main.f772
-rw-r--r--org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test2-lot-includes-main-file.f772
-rw-r--r--org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/07-singleLineIf-test.f902
-rw-r--r--org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/08-labelAndComments-test.f902
-rw-r--r--org.eclipse.photran.core.vpg.tests/src/org/eclipse/photran/internal/tests/lexer/preprocessor/fortran_include/FortranIncludeFixedFormTestCase.java25
7 files changed, 16 insertions, 21 deletions
diff --git a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/basic-include-main.f77 b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/basic-include-main.f77
index 8c906c88..ee3e1e57 100644
--- a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/basic-include-main.f77
+++ b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/basic-include-main.f77
@@ -1,4 +1,4 @@
program test
include "basic-include.f"
- end program \ No newline at end of file
+ end program
diff --git a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/no-include.f77 b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/no-include.f77
index ecb731e9..620d163d 100644
--- a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/no-include.f77
+++ b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/no-include.f77
@@ -1,4 +1,4 @@
program test!<<<<<START
- end program!<<<<<END \ No newline at end of file
+ end program!<<<<<END
diff --git a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test1-two-includes-main.f77 b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test1-two-includes-main.f77
index f808503f..94040ef6 100644
--- a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test1-two-includes-main.f77
+++ b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test1-two-includes-main.f77
@@ -11,4 +11,4 @@
stop
continue
- end program \ No newline at end of file
+ end program
diff --git a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test2-lot-includes-main-file.f77 b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test2-lot-includes-main-file.f77
index a2381b97..32fcade5 100644
--- a/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test2-lot-includes-main-file.f77
+++ b/org.eclipse.photran.core.vpg.tests/fixed-form-test-code/fixed-form-lexer/fortran-include-stmt/test2-lot-includes-main-file.f77
@@ -15,4 +15,4 @@
stop
continue
- end program \ No newline at end of file
+ end program
diff --git a/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/07-singleLineIf-test.f90 b/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/07-singleLineIf-test.f90
index e83a76a3..ee74538d 100644
--- a/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/07-singleLineIf-test.f90
+++ b/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/07-singleLineIf-test.f90
@@ -7,4 +7,4 @@
if(j == 2)then
print *,"asdf"
end if
- end program singlelineif !<<<<<END \ No newline at end of file
+ end program singlelineif !<<<<<END
diff --git a/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/08-labelAndComments-test.f90 b/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/08-labelAndComments-test.f90
index 52c38ec3..71e9c01d 100644
--- a/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/08-labelAndComments-test.f90
+++ b/org.eclipse.photran.core.vpg.tests/refactoring-test-code/infrastructure/reindenter/08-labelAndComments-test.f90
@@ -8,4 +8,4 @@ program labelAndComment !<<<<<START
z = 20 !this is my favorite number
2 if(x == 5) print *, "Hello"
- end program !<<<<<END \ No newline at end of file
+ end program !<<<<<END
diff --git a/org.eclipse.photran.core.vpg.tests/src/org/eclipse/photran/internal/tests/lexer/preprocessor/fortran_include/FortranIncludeFixedFormTestCase.java b/org.eclipse.photran.core.vpg.tests/src/org/eclipse/photran/internal/tests/lexer/preprocessor/fortran_include/FortranIncludeFixedFormTestCase.java
index 55a97ffc..9be4d5f8 100644
--- a/org.eclipse.photran.core.vpg.tests/src/org/eclipse/photran/internal/tests/lexer/preprocessor/fortran_include/FortranIncludeFixedFormTestCase.java
+++ b/org.eclipse.photran.core.vpg.tests/src/org/eclipse/photran/internal/tests/lexer/preprocessor/fortran_include/FortranIncludeFixedFormTestCase.java
@@ -11,42 +11,37 @@
package org.eclipse.photran.internal.tests.lexer.preprocessor.fortran_include;
import java.io.ByteArrayInputStream;
-import java.io.File;
import java.io.IOException;
import java.net.URISyntaxException;
-import java.util.TreeMap;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.core.runtime.Plugin;
import org.eclipse.photran.core.IFortranAST;
import org.eclipse.photran.internal.core.refactoring.infrastructure.SourcePrinter;
-import org.eclipse.photran.internal.core.reindenter.Reindenter;
-import org.eclipse.photran.internal.core.reindenter.Reindenter.Strategy;
import org.eclipse.photran.internal.core.vpg.PhotranVPG;
import org.eclipse.photran.internal.tests.Activator;
import org.eclipse.photran.internal.tests.PhotranWorkspaceTestCase;
/**
+ * Unit tests for INCLUDE lines in fixed form code.
*
- * @author Mariano Méndez
+ * @author Mariano Mendez
+ * @author Jeff Overbey
*/
-public class FortranIncludeFixedFormTestCase extends PhotranWorkspaceTestCase
+public final class FortranIncludeFixedFormTestCase extends PhotranWorkspaceTestCase
{
private static final String DIR = "fixed-form-test-code/fixed-form-lexer/fortran-include-stmt";
-
- protected String filename = null;
- private int fromLine;
- private int thruLine;
-
- public FortranIncludeFixedFormTestCase() {;} // when JUnit invokes a subclass outside a test suite
+ protected final String filename;
public FortranIncludeFixedFormTestCase(String filename)
{
- this.filename =filename;
+ if (filename.equals("test"))
+ this.filename = null; // Constructor called by JUnit, not by FortranIncludeFixedFormTestSuite
+ else
+ this.filename = filename;
+
this.setName("test");
}

Back to the top