Änderungen an Testfiles und Logger

This commit is contained in:
JanUlrich 2015-02-06 15:41:01 +01:00
parent f9bfe6fb44
commit 0922b9e899
17 changed files with 41 additions and 22 deletions

View File

@ -25,6 +25,10 @@ public class Logger {
});
}
public static LoggerConfiguration getConfiguration(){
return Logger.standardConfiguration;
}
/**
* Logt eine Debug Message, welche zusätzlich einer bestimmten Section zugewiesen wird.
* Dadurch lässt sich die DEBUG ausgabe übersichtlicher gestalten.

View File

@ -218,6 +218,15 @@ public class GenericTypeVar extends Type
public int getEndOffset() {
return this.getOffset() + this.name.toString().length();
}
@Override
public void parserPostProcessing(SyntaxTreeNode parent) {
//SyntaxTreeNode parentTemp = this.parent;
super.parserPostProcessing(parent);
//if(parentTemp != null)this.parent = parentTemp; //Der Parenttype einer GenericVar soll sich nicht ändern können, falls einmal gesetzt.
}
}
// ino.end

View File

@ -36,6 +36,7 @@ public class FunNMethod extends Method{
this.parserPostProcessing(new Class("Fun"+paralist.size(), 0));
}
/*
public FunNMethod(int N){
super(0); //Hat keinen Offset, da nur theoretisch gedachte Methode
this.setType(TypePlaceholder.fresh(this));
@ -53,7 +54,7 @@ public class FunNMethod extends Method{
this.parameterlist = pl;
this.parserPostProcessing(new Class("Fun"+N, 0));
}
*/
@Override
public TypeInsertPoint createTypeInsertPoint(TypePlaceholder tph,
ResultSet resultSet) {

View File

@ -27,7 +27,7 @@ public class TypeInsertTester{
private static Logger inferencelog = Logger.getLogger(TypeInsertTester.class.getName());
static{
{
Logger.setStandardConfiguration(new LoggerConfiguration().setOutput(Section.TYPEINFERENCE, System.out));
Logger.getConfiguration().setOutput(Section.TYPEINFERENCE, System.out);
/*
// Ausgabeoptionen fuer die Logger
ConsoleAppender logAppender = new ConsoleAppender(new SimpleLayout());

View File

@ -1,5 +1,5 @@
class BoundedGenericTest<A extends String>{
var;
var = "test";
<B extends A> B methode(){
return var;
}

View File

@ -1,9 +1,9 @@
import java.util.Vector;
class ImportTest{
var;
void methode(a){
var;
var.add(a);
}

View File

@ -1,6 +1,6 @@
class IntTest{
var;
int methode(){
var;
return var;
}
}

View File

@ -1,8 +1,6 @@
class Test{
m;
<CT, CT extends String> CT methode(){
<CT extends String> CT methode(m){
return m;
}

View File

@ -1,8 +1,6 @@
class Test{
m;
<CT> CT methode(){
<CT> CT methode(m){
return m;
}

View File

@ -1,5 +1,5 @@
class LambdaTest<R,S>{
class LambdaTest<A,B>{
Fun1<Fun1<R, Fun2<R, LambdaTest<R,S>, S>>, S> op = (m) -> (f) -> f.apply(this,m);
Fun1<Fun1<A, Fun2<A, LambdaTest<A,B>, B>>, B> op = (m) -> (f) -> f.apply(this,m);
}

View File

@ -4,12 +4,17 @@ import java.util.Vector;
import org.junit.Test;
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.logger.LoggerConfiguration;
import de.dhbwstuttgart.logger.Section;
public class LambdaTest2 {
private static final String TEST_FILE = "LambdaTest2.jav";
@Test
public void run(){
Logger.getConfiguration().setOutput(Section.ASSUMPTIONS, System.out);
Vector<String> mustContain = new Vector<String>();
//mustContain.add("S m");
MultipleTypesInsertTester.test(this.TEST_FILE, mustContain);

View File

@ -1,9 +1,11 @@
package plugindevelopment.TypeInsertTests;
package plugindevelopment.TypeInsertTests.LargeSourceCodeTests;
import java.util.Vector;
import org.junit.Test;
import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester;
public class LambdaTest22 {
private static final String TEST_FILE = "LambdaTest22.jav";

View File

@ -1,9 +1,10 @@
package plugindevelopment.TypeInsertTests;
package plugindevelopment.TypeInsertTests.LargeSourceCodeTests;
import java.util.Vector;
import org.junit.Test;
import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester;
import de.dhbwstuttgart.logger.Logger;
import de.dhbwstuttgart.logger.LoggerConfiguration;
import de.dhbwstuttgart.logger.Section;

View File

@ -1,9 +1,11 @@
package plugindevelopment.TypeInsertTests;
package plugindevelopment.TypeInsertTests.LargeSourceCodeTests;
import java.util.Vector;
import org.junit.Test;
import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester;
public class TypedMatrixSimpleTest {
private static final String TEST_FILE = "TypedMatrixSimpleTest.jav";

View File

@ -1,9 +1,11 @@
package plugindevelopment.TypeInsertTests;
package plugindevelopment.TypeInsertTests.LargeSourceCodeTests;
import java.util.Vector;
import org.junit.Test;
import plugindevelopment.TypeInsertTests.MultipleTypesInsertTester;
public class TypedMatrixTest {
private static final String TEST_FILE = "TypedMatrixTest.jav";

View File

@ -22,7 +22,7 @@ public class MultipleTypesInsertTester extends TypeInsertTester{
public MultipleTypesInsertTester(){
//Output von TYPEINFERENCE auf die Console setzen:
Logger.setStandardConfiguration(new LoggerConfiguration().setOutput(Section.TYPEINFERENCE, System.out));
Logger.getConfiguration().setOutput(Section.TYPEINFERENCE, System.out);
}
public static void test(String sourceFileToInfere, Vector<String> mustContain){

View File

@ -1,16 +1,13 @@
class OverloadingInsertTest{
var;
overload(){
return this;
}
}
class Overloading2{
var2;
methode(){
methode(var2){
return var2.overload();
}