modified: src/test/java/typeinference/JavaTXCompilerTest.java
modified: src/test/java/typeinference/Meth_GenTest.java modified: src/test/java/typeinference/UnifyTest.java Tests angepasst
This commit is contained in:
parent
cdc6a3f2dd
commit
071f4cd9ca
@ -1,5 +1,6 @@
|
|||||||
package typeinference;
|
package typeinference;
|
||||||
|
|
||||||
|
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGenratorResultForSourceFile;
|
||||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||||
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
||||||
@ -133,6 +134,7 @@ public class JavaTXCompilerTest {
|
|||||||
System.out.println(ASTPrinter.print(sf));
|
System.out.println(ASTPrinter.print(sf));
|
||||||
}
|
}
|
||||||
List<ResultSet> results = compiler.typeInference();
|
List<ResultSet> results = compiler.typeInference();
|
||||||
|
List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles = compiler.getGeneratedGenericResultsForAllSourceFiles(results);
|
||||||
|
|
||||||
for(File f : compiler.sourceFiles.keySet()){
|
for(File f : compiler.sourceFiles.keySet()){
|
||||||
SourceFile sf = compiler.sourceFiles.get(f);
|
SourceFile sf = compiler.sourceFiles.get(f);
|
||||||
@ -142,7 +144,7 @@ public class JavaTXCompilerTest {
|
|||||||
assert results.size()>0;
|
assert results.size()>0;
|
||||||
Set<String> insertedTypes = new HashSet<>();
|
Set<String> insertedTypes = new HashSet<>();
|
||||||
for(ResultSet resultSet : results){
|
for(ResultSet resultSet : results){
|
||||||
Set<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet, results);
|
Set<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet, results, simplifyResultsForAllSourceFiles);
|
||||||
assert result.size()>0;
|
assert result.size()>0;
|
||||||
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
|
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
|
||||||
for(TypeInsert tip : result){
|
for(TypeInsert tip : result){
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package typeinference;
|
package typeinference;
|
||||||
|
|
||||||
|
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGenratorResultForSourceFile;
|
||||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||||
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
||||||
@ -105,6 +106,7 @@ public class Meth_GenTest {
|
|||||||
System.out.println(ASTPrinter.print(sf));
|
System.out.println(ASTPrinter.print(sf));
|
||||||
}
|
}
|
||||||
List<ResultSet> results = compiler.typeInference();
|
List<ResultSet> results = compiler.typeInference();
|
||||||
|
List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles = compiler.getGeneratedGenericResultsForAllSourceFiles(results);
|
||||||
|
|
||||||
for(File f : compiler.sourceFiles.keySet()){
|
for(File f : compiler.sourceFiles.keySet()){
|
||||||
SourceFile sf = compiler.sourceFiles.get(f);
|
SourceFile sf = compiler.sourceFiles.get(f);
|
||||||
@ -114,7 +116,7 @@ public class Meth_GenTest {
|
|||||||
assert results.size()>0;
|
assert results.size()>0;
|
||||||
Set<String> insertedTypes = new HashSet<>();
|
Set<String> insertedTypes = new HashSet<>();
|
||||||
for(ResultSet resultSet : results){
|
for(ResultSet resultSet : results){
|
||||||
Set<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet, results);
|
Set<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet, results, simplifyResultsForAllSourceFiles);
|
||||||
assert result.size()>0;
|
assert result.size()>0;
|
||||||
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
|
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
|
||||||
for(TypeInsert tip : result){
|
for(TypeInsert tip : result){
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package typeinference;
|
package typeinference;
|
||||||
|
|
||||||
|
import de.dhbwstuttgart.bytecode.genericsGeneratorTypes.GenericGenratorResultForSourceFile;
|
||||||
import de.dhbwstuttgart.core.JavaTXCompiler;
|
import de.dhbwstuttgart.core.JavaTXCompiler;
|
||||||
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
import de.dhbwstuttgart.syntaxtree.SourceFile;
|
||||||
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
import de.dhbwstuttgart.syntaxtree.visual.ASTPrinter;
|
||||||
@ -131,6 +132,7 @@ public class UnifyTest {
|
|||||||
System.out.println(ASTPrinter.print(sf));
|
System.out.println(ASTPrinter.print(sf));
|
||||||
}
|
}
|
||||||
List<ResultSet> results = compiler.typeInference();
|
List<ResultSet> results = compiler.typeInference();
|
||||||
|
List<GenericGenratorResultForSourceFile> simplifyResultsForAllSourceFiles = compiler.getGeneratedGenericResultsForAllSourceFiles(results);
|
||||||
|
|
||||||
for(File f : compiler.sourceFiles.keySet()){
|
for(File f : compiler.sourceFiles.keySet()){
|
||||||
SourceFile sf = compiler.sourceFiles.get(f);
|
SourceFile sf = compiler.sourceFiles.get(f);
|
||||||
@ -140,7 +142,7 @@ public class UnifyTest {
|
|||||||
assert results.size()>0;
|
assert results.size()>0;
|
||||||
Set<String> insertedTypes = new HashSet<>();
|
Set<String> insertedTypes = new HashSet<>();
|
||||||
for(ResultSet resultSet : results){
|
for(ResultSet resultSet : results){
|
||||||
Set<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet, results);
|
Set<TypeInsert> result = TypeInsertFactory.createTypeInsertPoints(sf, resultSet, results, simplifyResultsForAllSourceFiles);
|
||||||
assert result.size()>0;
|
assert result.size()>0;
|
||||||
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
|
String content = readFile(f.getPath(), StandardCharsets.UTF_8);
|
||||||
for(TypeInsert tip : result){
|
for(TypeInsert tip : result){
|
||||||
|
Loading…
Reference in New Issue
Block a user