Просмотр исходного кода

Deleted deprecated project "org.yakindu.sct.generator.java.test"

Andreas Mülder 13 лет назад
Родитель
Сommit
c4fe070fe6

+ 0 - 7
test-plugins/org.yakindu.sct.generator.java.test/.classpath

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<classpath>
-	<classpathentry kind="src" path="src"/>
-	<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="output" path="bin"/>
-</classpath>

+ 0 - 39
test-plugins/org.yakindu.sct.generator.java.test/.project

@@ -1,39 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<projectDescription>
-	<name>org.yakindu.sct.generator.java.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>
-	<filteredResources>
-		<filter>
-			<id>1337757590599</id>
-			<name>target</name>
-			<type>14</type>
-			<matcher>
-				<id>org.eclipse.ui.ide.multiFilter</id>
-				<arguments>1.0-name-matches-false-false-*</arguments>
-			</matcher>
-		</filter>
-	</filteredResources>
-</projectDescription>

+ 0 - 8
test-plugins/org.yakindu.sct.generator.java.test/.settings/org.eclipse.jdt.core.prefs

@@ -1,8 +0,0 @@
-#Mon Apr 30 15:22:12 CEST 2012
-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 - 15
test-plugins/org.yakindu.sct.generator.java.test/META-INF/MANIFEST.MF

@@ -1,15 +0,0 @@
-Manifest-Version: 1.0
-Bundle-ManifestVersion: 2
-Bundle-Name: Test
-Bundle-SymbolicName: org.yakindu.sct.generator.java.test
-Bundle-Version: 1.0.0.qualifier
-Bundle-RequiredExecutionEnvironment: JavaSE-1.6
-Require-Bundle: org.yakindu.sct.generator.java;bundle-version="1.0.0",
- org.junit;bundle-version="4.8.2",
- org.yakindu.sct.generator.core;bundle-version="1.0.0",
- com.google.inject;bundle-version="2.0.0",
- org.eclipse.xtext.junit4;bundle-version="2.0.1",
- org.yakindu.sct.generator.genmodel;bundle-version="1.0.0",
- org.eclipse.jdt.core;bundle-version="3.7.3",
- org.yakindu.sct.test.models;bundle-version="1.0.0",
- org.eclipse.ui;bundle-version="3.7.0"

+ 0 - 4
test-plugins/org.yakindu.sct.generator.java.test/build.properties

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

+ 0 - 90
test-plugins/org.yakindu.sct.generator.java.test/pom.xml

@@ -1,90 +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.sct</groupId>
-		<artifactId>org.yakindu.sct.releng</artifactId>
-		<version>1.0.0-SNAPSHOT</version>
-		<relativePath>../org.yakindu.sct.releng/pom.xml</relativePath>
-	</parent>
-	<artifactId>org.yakindu.sct.generator.java.test</artifactId>
-	<groupId>org.yakindu.sct.plugins</groupId>
-	<packaging>eclipse-test-plugin</packaging>
-
-	<profiles>
-		<profile>
-			<id>CI</id>
-			<!-- Test failures are collected by jenkins and evaluated for instable 
-				builds -->
-			<properties>
-				<testFailureIgnore>true</testFailureIgnore>
-			</properties>
-		</profile>
-		<profile>
-			<id>macosx</id>
-			<activation>
-				<os>
-					<family>mac</family>
-				</os>
-			</activation>
-			<properties>
-				<test.vmargs>-Xmx512m -XX:MaxPermSize=256m -XstartOnFirstThread
-				</test.vmargs>
-			</properties>
-		</profile>
-		<profile>
-			<id>other-os</id>
-			<activation>
-				<os>
-					<family>!mac</family>
-				</os>
-			</activation>
-			<properties>
-				<test.vmargs>-Xmx512m -XX:MaxPermSize=256m</test.vmargs>
-			</properties>
-		</profile>
-	</profiles>
-
-	<properties>
-		<testFailureIgnore>false</testFailureIgnore>
-	</properties>
-
-	<build>
-		<sourceDirectory>src</sourceDirectory>
-		<plugins>
-			<plugin>
-				<groupId>org.eclipse.tycho</groupId>
-				<artifactId>tycho-surefire-plugin</artifactId>
-				<version>${tycho-version}</version>
-				<configuration>
-					<useUIHarness>true</useUIHarness>
-					<useUIThread>true</useUIThread>
-					<testFailureIgnore>${testFailureIgnore}</testFailureIgnore>
-					<argLine>${test.vmargs}</argLine>
-<!-- 					<dependencies> -->
-<!-- 						<dependency> -->
-<!-- 							<artifactid>org.eclipse.platform.ide</artifactid> -->
-<!-- 							<version>0.0.0</version> -->
-<!-- 							<type>eclipse-feature</type> -->
-<!-- 						</dependency> -->
-<!-- 					</dependencies> -->
-				</configuration>
-			</plugin>
-			<plugin>
-				<groupId>org.eclipse.tycho</groupId>
-				<artifactId>tycho-source-plugin</artifactId>
-				<version>${tycho-version}</version>
-				<executions>
-					<execution>
-						<id>plugin-source</id>
-						<goals>
-							<goal>plugin-source</goal>
-						</goals>
-					</execution>
-				</executions>
-			</plugin>
-		</plugins>
-	</build>
-</project>

+ 0 - 169
test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/JavaSCTGeneratorTest.java

@@ -1,169 +0,0 @@
-/**
- * Copyright (c) 2012 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.sct.generator.java;
-
-import static util.TestModels.ALWAYS_ONCYCLE;
-import static util.TestModels.CHOICE;
-import static util.TestModels.DEEP_HISTORY;
-import static util.TestModels.FEATURE_CALLS;
-import static util.TestModels.GUARD;
-import static util.TestModels.PRIORITY_VALUES;
-import static util.TestModels.SHALLOW_HISTORY;
-import static util.TestModels.SIMPLE_EVENT;
-import static util.TestModels.SIMPLE_HIERACHY;
-import static util.TestModels.STATECHART_LOCAL_REACTIONS;
-import static util.TestModels.STATE_ACTIVE;
-import static util.TestModels.SYNC_FORK;
-import static util.TestModels.SYNC_JOIN;
-import static util.TestModels.TIME_TRIGGER;
-import static util.TestModels.VALUED_EVENTS;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.xtext.junit4.InjectWith;
-import org.eclipse.xtext.junit4.XtextRunner;
-import org.junit.Assert;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.yakindu.sct.generator.java.util.AbstractJavaGeneratorTest;
-import org.yakindu.sct.generator.java.util.JavaGeneratorInjectionProvider;
-import org.yakindu.sct.model.sgraph.Statechart;
-
-import util.TestModels;
-
-import com.google.inject.Inject;
-
-/**
- * These tests only check for compile errors, they don't check the behaviour of
- * the generated Statemachine!
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-@RunWith(XtextRunner.class)
-@InjectWith(JavaGeneratorInjectionProvider.class)
-public class JavaSCTGeneratorTest extends AbstractJavaGeneratorTest {
-
-	@Inject
-	private TestModels models;
-
-	@Test
-	public void testAlwaysOnCycleModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(ALWAYS_ONCYCLE);
-		failOnError(generateAndCompile(statechart));
-
-	}
-
-	@Test
-	public void testChoiceModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(CHOICE);
-		failOnError(generateAndCompile(statechart));
-
-	}
-
-	@Test
-	public void testDeepHistoryModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(DEEP_HISTORY);
-		failOnError(generateAndCompile(statechart));
-
-	}
-
-	@Test
-	public void testFeatureCallsModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(FEATURE_CALLS);
-		failOnError(generateAndCompile(statechart));
-
-	}
-
-	@Test
-	public void testGuardModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(GUARD);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testPriorityValuesModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(PRIORITY_VALUES);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testShallowHistoryModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(SHALLOW_HISTORY);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testSimpleEventModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(SIMPLE_EVENT);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testSimpleHierachyModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(SIMPLE_HIERACHY);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testStatechartLocalReactionsModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(STATECHART_LOCAL_REACTIONS);
-		failOnError(generateAndCompile(statechart));
-
-	}
-
-	@Test
-	public void testStateActiveModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(STATE_ACTIVE);
-		failOnError(generateAndCompile(statechart));
-
-	}
-
-	@Test
-	public void testSyncForkModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(SYNC_FORK);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testSyncJoinModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(SYNC_JOIN);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testTimeTriggerModel() throws Exception {
-		Statechart statechart = models.loadStatechartFromResource(TIME_TRIGGER);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	@Test
-	public void testValuedEventsModel() throws Exception {
-		Statechart statechart = models
-				.loadStatechartFromResource(VALUED_EVENTS);
-		failOnError(generateAndCompile(statechart));
-	}
-
-	private void failOnError(IMarker[] diagnostics) throws CoreException {
-		for (IMarker diagnostic : diagnostics) {
-			int severity = (Integer) diagnostic.getAttribute("severity");
-			if (severity == IMarker.SEVERITY_ERROR) {
-				Assert.fail(diagnostic.getAttribute(IMarker.MESSAGE, ""));
-			}
-		}
-	}
-}

+ 0 - 93
test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/util/AbstractJavaGeneratorTest.java

@@ -1,93 +0,0 @@
-/**
- * Copyright (c) 2012 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.sct.generator.java.util;
-
-import org.eclipse.core.resources.IMarker;
-import org.eclipse.core.resources.IProject;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IncrementalProjectBuilder;
-import org.eclipse.core.runtime.NullProgressMonitor;
-import org.eclipse.jdt.core.IJavaModelMarker;
-import org.yakindu.sct.generator.core.util.GeneratorUtils;
-import org.yakindu.sct.generator.java.JavaSCTGenerator;
-import org.yakindu.sct.model.sgen.FeatureConfiguration;
-import org.yakindu.sct.model.sgen.FeatureParameter;
-import org.yakindu.sct.model.sgen.FeatureParameterValue;
-import org.yakindu.sct.model.sgen.FeatureType;
-import org.yakindu.sct.model.sgen.GeneratorEntry;
-import org.yakindu.sct.model.sgen.SGenFactory;
-import org.yakindu.sct.model.sgraph.Statechart;
-
-import com.google.inject.Inject;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public abstract class AbstractJavaGeneratorTest {
-
-	private static final String SRC_GEN = "src-gen";
-	private static final String TARGET_PROJECT = "targetProject";
-	private static final String CONTENT_TYPE = "statechart";
-	private static final String OUTLET_FEATURE = "Outlet";
-	private static final String TARGET_FOLDER = "targetFolder";
-
-	@Inject
-	protected JavaSCTGenerator generator;
-
-
-	public IMarker[] generateAndCompile(
-			Statechart statechart) throws Exception {
-		GeneratorEntry entry = createGeneratorEntry(statechart.getName(),
-				SRC_GEN);
-		entry.setElementRef(statechart);
-		IProject targetProject = GeneratorUtils.getTargetProject(entry);
-		targetProject.delete(true, new NullProgressMonitor());
-		generator.generate(entry);
-		targetProject = GeneratorUtils.getTargetProject(entry);
-		targetProject.build(IncrementalProjectBuilder.INCREMENTAL_BUILD,
-				new NullProgressMonitor());
-		IMarker[] markers = targetProject.findMarkers(IJavaModelMarker.JAVA_MODEL_PROBLEM_MARKER,
-				true, IResource.DEPTH_INFINITE);
-		return markers;
-	}
-
-	private GeneratorEntry createGeneratorEntry(String targetProject,
-			String targetFolder) {
-		GeneratorEntry entry = SGenFactory.eINSTANCE.createGeneratorEntry();
-		entry.setContentType(CONTENT_TYPE);
-		FeatureConfiguration config = SGenFactory.eINSTANCE
-				.createFeatureConfiguration();
-		FeatureType type = SGenFactory.eINSTANCE.createFeatureType();
-		type.setName(OUTLET_FEATURE);
-		config.setType(type);
-		FeatureParameterValue project = SGenFactory.eINSTANCE
-				.createFeatureParameterValue();
-		FeatureParameter projectParameter = SGenFactory.eINSTANCE
-				.createFeatureParameter();
-		projectParameter.setName(TARGET_PROJECT);
-		project.setParameter(projectParameter);
-		project.setValue(targetProject);
-		config.getParameterValues().add(project);
-		FeatureParameterValue targetFolderValue = SGenFactory.eINSTANCE
-				.createFeatureParameterValue();
-		FeatureParameter targetParameter = SGenFactory.eINSTANCE
-				.createFeatureParameter();
-		targetParameter.setName(TARGET_FOLDER);
-		targetFolderValue.setParameter(targetParameter);
-		targetFolderValue.setValue(targetFolder);
-		config.getParameterValues().add(targetFolderValue);
-		entry.getFeatures().add(config);
-		return entry;
-	}
-
-}

+ 0 - 30
test-plugins/org.yakindu.sct.generator.java.test/src/org/yakindu/sct/generator/java/util/JavaGeneratorInjectionProvider.java

@@ -1,30 +0,0 @@
-/**
- * Copyright (c) 2012 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.sct.generator.java.util;
-
-import org.eclipse.xtext.junit4.IInjectorProvider;
-import org.yakindu.sct.model.sexec.transformation.SequencerModule;
-
-import com.google.inject.Guice;
-import com.google.inject.Injector;
-
-/**
- * 
- * @author andreas muelder - Initial contribution and API
- * 
- */
-public class JavaGeneratorInjectionProvider implements IInjectorProvider {
-
-	public Injector getInjector() {
-		return Guice.createInjector(new SequencerModule());
-	}
-
-}