Andreas Mülder 11 лет назад
Родитель
Сommit
445ed389cd

+ 0 - 7
test-plugins/org.yakindu.base.types.test/.classpath

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
-	<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
-	<classpathentry kind="src" path="src"/>
-	<classpathentry kind="output" path="bin"/>
-</classpath>

+ 0 - 28
test-plugins/org.yakindu.base.types.test/.project

@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.yakindu.base.types.test</name>
-	<comment></comment>
-	<projects>
-	</projects>
-	<buildSpec>
-		<buildCommand>
-			<name>org.eclipse.jdt.core.javabuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.ManifestBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-		<buildCommand>
-			<name>org.eclipse.pde.SchemaBuilder</name>
-			<arguments>
-			</arguments>
-		</buildCommand>
-	</buildSpec>
-	<natures>
-		<nature>org.eclipse.pde.PluginNature</nature>
-		<nature>org.eclipse.jdt.core.javanature</nature>
-	</natures>
-</projectDescription>

+ 0 - 7
test-plugins/org.yakindu.base.types.test/.settings/org.eclipse.jdt.core.prefs

@@ -1,7 +0,0 @@
-eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
-org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
-org.eclipse.jdt.core.compiler.compliance=1.6
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
-org.eclipse.jdt.core.compiler.source=1.6

+ 0 - 9
test-plugins/org.yakindu.base.types.test/META-INF/MANIFEST.MF

@@ -1,9 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Base Types Tests
-Bundle-SymbolicName: org.yakindu.base.types.test
-Bundle-Version: 2.4.1.qualifier
-Bundle-Vendor: statecharts.org
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.yakindu.base.types,
- org.junit

+ 0 - 4
test-plugins/org.yakindu.base.types.test/build.properties

@@ -1,4 +0,0 @@
-source.. = src/
-output.. = bin/
-bin.includes = META-INF/,\
-               .

+ 0 - 15
test-plugins/org.yakindu.base.types.test/pom.xml

@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<project
-	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
-	xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
-	<modelVersion>4.0.0</modelVersion>
-	<parent>
-		<groupId>org.yakindu.base</groupId>
-		<artifactId>org.yakindu.base.releng</artifactId>
-		<version>2.4.1-SNAPSHOT</version>
-		<relativePath>../org.yakindu.base.releng/pom.xml</relativePath>
-	</parent>
-	<artifactId>org.yakindu.base.types.test</artifactId>
-	<groupId>org.yakindu.base.plugins</groupId>
-	<packaging>eclipse-test-plugin</packaging>
-</project>

+ 0 - 112
test-plugins/org.yakindu.base.types.test/src/org/yakindu/base/types/test/AbstractTypeSystemTest.java

@@ -1,112 +0,0 @@
-/**
- * Copyright (c) 2015 committers of YAKINDU and others.
- * 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:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.types.test;
-
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNull;
-import static org.junit.Assert.assertTrue;
-
-import org.junit.Test;
-import org.yakindu.base.types.PrimitiveType;
-import org.yakindu.base.types.Type;
-import org.yakindu.base.types.TypesFactory;
-import org.yakindu.base.types.typesystem.AbstractTypeSystem;
-
-/**
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class AbstractTypeSystemTest extends AbstractTypeSystem {
-
-	private static final String SUB_TYPE = "SubType";
-	private static final String SUB_TYPE2 = "SubType2";
-	private static final String SUPER_TYPE = "SuperType";
-	private static final String SIMPLE_TYPE = "SimpleType";
-	private static final String CONVERSION_SUB_TYPE = "ConversionSubType";
-	private static final String CONVERSION_TYPE = "ConversionType";
-
-	private Type superType;
-	private Type subType;
-	private Type subType2;
-	private Type simpleType;
-	private Type conversionType;
-	private Type conversionSubType;
-
-	@Override
-	protected void initBuiltInTypes() {
-		// SubType extends SuperType
-		superType = createPrimitive(SUPER_TYPE);
-		declareType(superType, SUPER_TYPE);
-		subType = createPrimitive(SUB_TYPE);
-		declareType(subType, SUB_TYPE);
-		declareSuperType(superType, subType);
-		// SubType2 extends Supertype
-		subType2 = createPrimitive(SUB_TYPE2);
-		declareType(subType2, SUB_TYPE2);
-		declareSuperType(superType, subType2);
-		// SimpleType
-		simpleType = createPrimitive(SIMPLE_TYPE);
-		declareType(simpleType, SIMPLE_TYPE);
-		//simpleType can be converted into Conversiontype
-		conversionType = createPrimitive(CONVERSION_TYPE);
-		declareConversion(simpleType, conversionType);
-		conversionSubType = createPrimitive(CONVERSION_SUB_TYPE);
-		declareSuperType(conversionType, conversionSubType);
-		
-	}
-
-	protected Type createPrimitive(String name) {
-		PrimitiveType result = TypesFactory.eINSTANCE.createPrimitiveType();
-		result.setName(name);
-		return result;
-	}
-
-	@Test
-	public void testGetSuperType() throws Exception {
-		assertTrue(isSame(superType, getSuperType(subType)));
-
-	}
-
-	@Test
-	public void testIsSuperType() throws Exception {
-		assertTrue(isSuperType(subType, superType));
-		assertFalse(isSuperType(superType, subType));
-	}
-
-	@Test
-	public void testHaveCommonType() throws Exception {
-		assertTrue(haveCommonType(subType, subType2));
-		assertTrue(haveCommonType(subType, superType));
-		assertTrue(haveCommonType(superType, subType));
-		assertFalse(haveCommonType(superType, simpleType));
-	}
-
-	@Test
-	public void testGetCommonType() throws Exception {
-		assertTrue(isSame(superType, getCommonType(subType, subType2)));
-		assertTrue(isSame(superType, getCommonType(subType, superType)));
-		assertTrue(isSame(superType, getCommonType(superType, subType)));
-
-		assertNull(getCommonType(superType, simpleType));
-	}
-	
-	@Test
-	public void testGetCommonTypeWithConversion() throws Exception {
-		assertTrue(isSame(conversionType, getCommonType(conversionType, simpleType)));
-		assertTrue(isSame(conversionType, getCommonType(conversionType, conversionSubType)));
-	}
-
-	@Override
-	public Object defaultValue(Type type) {
-		return null;
-	}
-
-}

+ 0 - 22
test-plugins/org.yakindu.base.types.test/src/org/yakindu/base/types/test/AllTests.java

@@ -1,22 +0,0 @@
-/**
- * Copyright (c) 2015 committers of YAKINDU and others.
- * 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:
- * 	committers of YAKINDU - initial API and implementation
- * 
- */
-package org.yakindu.base.types.test;
-
-import org.junit.runners.Suite.SuiteClasses;
-
-/**
- * @author andreas muelder - Initial contribution and API
- * 
- */
-@SuiteClasses(AbstractTypeSystemTest.class)
-public class AllTests {
-
-}