improved parser string handling
[phpeclipse.git] / net.sourceforge.phpeclipse.tests / src / net / sourceforge / phpdt / core / tests / util / AbstractCompilerTest.java
index 031d81e..a85fa4d 100644 (file)
@@ -16,6 +16,7 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.util.ArrayList;
 import java.util.Locale;
+import java.util.Map;
 
 import junit.framework.Test;
 import junit.framework.TestCase;
@@ -25,6 +26,7 @@ import net.sourceforge.phpdt.internal.compiler.CompilationResult;
 import net.sourceforge.phpdt.internal.compiler.DefaultErrorHandlingPolicies;
 import net.sourceforge.phpdt.internal.compiler.batch.CompilationUnit;
 import net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit;
+import net.sourceforge.phpdt.internal.compiler.impl.CompilerOptions;
 import net.sourceforge.phpdt.internal.compiler.parser.UnitParser;
 import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblem;
 import net.sourceforge.phpdt.internal.compiler.problem.DefaultProblemFactory;
@@ -56,7 +58,7 @@ public class AbstractCompilerTest extends TestCase {
                        new UnitParser(
                                new ProblemReporter(
                                        DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
-                                       //new CompilerOptions(getCompilerOptions()), 
+                                       new CompilerOptions(getCompilerOptions()), 
                                        new DefaultProblemFactory(Locale.getDefault())));
 
                ICompilationUnit sourceUnit = new CompilationUnit(source, "", null);
@@ -114,7 +116,7 @@ public class AbstractCompilerTest extends TestCase {
                        new UnitParser(
                                new ProblemReporter(
                                        DefaultErrorHandlingPolicies.proceedWithAllProblems(), 
-                                       //new CompilerOptions(getCompilerOptions()), 
+                                       new CompilerOptions(getCompilerOptions()), 
                                        new DefaultProblemFactory(Locale.getDefault())));
 
                ICompilationUnit sourceUnit = new CompilationUnit(source, "", null);
@@ -256,8 +258,8 @@ public class AbstractCompilerTest extends TestCase {
                super(name);
        }
 
-//     protected Map getCompilerOptions() {
-//             Map options = new CompilerOptions().getMap();
+       protected Map getCompilerOptions() {
+               Map options = new CompilerOptions().getMap();
 //             if (COMPLIANCE_1_3.equals(this.complianceLevel)) {
 //                     options.put(CompilerOptions.OPTION_Compliance, CompilerOptions.VERSION_1_3);
 //                     options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_3);
@@ -271,8 +273,8 @@ public class AbstractCompilerTest extends TestCase {
 //                     options.put(CompilerOptions.OPTION_Source, CompilerOptions.VERSION_1_5);
 //                     options.put(CompilerOptions.OPTION_TargetPlatform, CompilerOptions.VERSION_1_5);
 //             }
-//             return options;
-//     }
+               return options;
+       }
 
        public String getName() {
                String name = super.getName();