Änderungen an Testfiles und Logger
This commit is contained in:
parent
f9bfe6fb44
commit
0922b9e899
@ -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.
|
||||
|
@ -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
|
||||
|
||||
|
@ -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) {
|
||||
|
@ -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());
|
||||
|
@ -1,5 +1,5 @@
|
||||
class BoundedGenericTest<A extends String>{
|
||||
var;
|
||||
var = "test";
|
||||
<B extends A> B methode(){
|
||||
return var;
|
||||
}
|
||||
|
@ -1,9 +1,9 @@
|
||||
import java.util.Vector;
|
||||
|
||||
class ImportTest{
|
||||
var;
|
||||
|
||||
void methode(a){
|
||||
var;
|
||||
var.add(a);
|
||||
}
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
class IntTest{
|
||||
var;
|
||||
int methode(){
|
||||
var;
|
||||
return var;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
class Test{
|
||||
|
||||
m;
|
||||
|
||||
<CT, CT extends String> CT methode(){
|
||||
<CT extends String> CT methode(m){
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
class Test{
|
||||
|
||||
m;
|
||||
|
||||
<CT> CT methode(){
|
||||
<CT> CT methode(m){
|
||||
return m;
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
||||
}
|
@ -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);
|
||||
|
@ -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";
|
||||
|
@ -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;
|
@ -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";
|
||||
|
@ -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";
|
||||
|
@ -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){
|
||||
|
@ -1,16 +1,13 @@
|
||||
class OverloadingInsertTest{
|
||||
|
||||
var;
|
||||
|
||||
overload(){
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
class Overloading2{
|
||||
var2;
|
||||
|
||||
methode(){
|
||||
methode(var2){
|
||||
return var2.overload();
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user