From 4087725c8b15d3777dd219d21041d346aed31a49 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 6 Jul 2009 17:48:09 +0000 Subject: [PATCH] world tests - not yet used --- .../aspectj/systemtest/ajc165/WorldTests.java | 44 +++++++++++++++++++ .../org/aspectj/systemtest/ajc165/world.xml | 5 +++ 2 files changed, 49 insertions(+) create mode 100644 tests/src/org/aspectj/systemtest/ajc165/WorldTests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc165/world.xml diff --git a/tests/src/org/aspectj/systemtest/ajc165/WorldTests.java b/tests/src/org/aspectj/systemtest/ajc165/WorldTests.java new file mode 100644 index 000000000..171aee572 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc165/WorldTests.java @@ -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 index 000000000..e9c113cc5 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc165/world.xml @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file -- 2.39.5