summaryrefslogtreecommitdiffstats
path: root/ajde
diff options
context:
space:
mode:
authoracolyer <acolyer>2004-06-08 15:18:12 +0000
committeracolyer <acolyer>2004-06-08 15:18:12 +0000
commita635a5de4c4b729cc33701f1d82c5c018c2259de (patch)
tree97c75085912905c0961f05f9fe9e96d39ff6fa9e /ajde
parentf7b9262987357427c40d48b2d3f3488d4af49ecc (diff)
downloadaspectj-a635a5de4c4b729cc33701f1d82c5c018c2259de.tar.gz
aspectj-a635a5de4c4b729cc33701f1d82c5c018c2259de.zip
update tests for new options processing
Diffstat (limited to 'ajde')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java30
1 files changed, 15 insertions, 15 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java b/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
index 1223b865d..61e96f396 100644
--- a/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
+++ b/ajde/testsrc/org/aspectj/ajde/BuildConfigurationTests.java
@@ -62,19 +62,19 @@ public class BuildConfigurationTests extends AjdeTestCase {
// The tests...
public void testCharacterEncoding() {
- buildOptions.setCharacterEncoding( "12345" );
+ buildOptions.setCharacterEncoding( "UTF-8" );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
String encoding = (String) options.get( CompilerOptions.OPTION_Encoding );
- assertEquals( "character encoding", "12345", encoding );
+ assertEquals( "character encoding", "UTF-8", encoding );
}
public void testComplianceLevel() {
buildOptions.setComplianceLevel( BuildOptionsAdapter.VERSION_14 );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
String compliance = (String) options.get(CompilerOptions.OPTION_Compliance);
String sourceLevel = (String) options.get(CompilerOptions.OPTION_Source);
assertEquals( "compliance level", CompilerOptions.VERSION_1_4, compliance);
@@ -86,7 +86,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setSourceCompatibilityLevel( BuildOptionsAdapter.VERSION_14);
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
String compliance = (String) options.get(CompilerOptions.OPTION_Compliance);
String sourceLevel = (String) options.get(CompilerOptions.OPTION_Source);
assertEquals( "compliance level", CompilerOptions.VERSION_1_3, compliance);
@@ -99,7 +99,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setSourceCompatibilityLevel( BuildOptionsAdapter.VERSION_13);
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
String compliance = (String) options.get(CompilerOptions.OPTION_Compliance);
String sourceLevel = (String) options.get(CompilerOptions.OPTION_Source);
assertEquals( "compliance level", CompilerOptions.VERSION_1_4, compliance);
@@ -111,7 +111,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setWarnings( null );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
// this should leave us with the default warnings
assertOptionEquals( "report overriding package default",
@@ -149,7 +149,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
assertOptionEquals( "report assert identifer",
options,
CompilerOptions.OPTION_ReportAssertIdentifier,
- CompilerOptions.IGNORE);
+ CompilerOptions.WARNING);
}
// public void testEmptyWarnings() {
@@ -213,7 +213,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setWarnings( warnings );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
// this should leave us with all the user specifiable warnings
// turned on
@@ -259,7 +259,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setDebugLevel( null );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
// this should leave us with the default debug settings
assertOptionEquals( "debug source",
@@ -280,9 +280,9 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setDebugLevel( new HashSet() );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
- // this should leave us with the debug on
+ // this should leave us with the default debug
assertOptionEquals( "debug source",
options,
CompilerOptions.OPTION_SourceFileAttribute,
@@ -303,7 +303,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setDebugLevel( debugOpts );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
// this should leave us with all debug on
assertOptionEquals( "debug source",
@@ -328,7 +328,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setDebugLevel( debugOpts );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
// this should leave us with all debug on
assertOptionEquals( "debug source",
@@ -359,7 +359,7 @@ public class BuildConfigurationTests extends AjdeTestCase {
buildOptions.setPreserveAllLocals( true );
buildConfig = compilerAdapter.genBuildConfig( configFile );
assertTrue(configFile + " failed", null != buildConfig);
- Map options = buildConfig.getJavaOptions();
+ Map options = buildConfig.getOptions().getMap();
String preserve = (String) options.get( CompilerOptions.OPTION_PreserveUnusedLocal );
assertEquals( "preserve unused", CompilerOptions.PRESERVE, preserve );
}