]> source.dussan.org Git - aspectj.git/commitdiff
world tests - not yet used
authoraclement <aclement>
Mon, 6 Jul 2009 17:48:09 +0000 (17:48 +0000)
committeraclement <aclement>
Mon, 6 Jul 2009 17:48:09 +0000 (17:48 +0000)
tests/src/org/aspectj/systemtest/ajc165/WorldTests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc165/world.xml [new file with mode: 0644]

diff --git a/tests/src/org/aspectj/systemtest/ajc165/WorldTests.java b/tests/src/org/aspectj/systemtest/ajc165/WorldTests.java
new file mode 100644 (file)
index 0000000..171aee5
--- /dev/null
@@ -0,0 +1,44 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Contributors 
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ *    Andy Clement - initial API and implementation
+ *******************************************************************************/
+package org.aspectj.systemtest.ajc165;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+import org.aspectj.weaver.UnresolvedType;
+import org.aspectj.weaver.bcel.BcelWorld;
+
+public class WorldTests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+       public void testWorldSize() {
+               BcelWorld world = new BcelWorld("../weaver5/bin/");
+               assertEquals(9, world.getFixed().size()); // 9 primitive types
+               assertEquals(0, world.getExpendable().size()); // nothing loaded
+
+               world.resolve(UnresolvedType.forSignature("LMA;"));
+               assertEquals(9, world.getFixed().size());
+               assertEquals(1, world.getExpendable().size());
+
+       }
+
+       // ---
+
+       public static Test suite() {
+               return XMLBasedAjcTestCase.loadSuite(WorldTests.class);
+       }
+
+       protected File getSpecFile() {
+               return new File("../tests/src/org/aspectj/systemtest/ajc165/world.xml");
+       }
+
+}
\ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc165/world.xml b/tests/src/org/aspectj/systemtest/ajc165/world.xml
new file mode 100644 (file)
index 0000000..e9c113c
--- /dev/null
@@ -0,0 +1,5 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+</suite>
\ No newline at end of file