2 Commits

Author SHA1 Message Date
Purplumbi504
bd61a0e595 Merge remote-tracking branch 'origin/Endabgabe' into Endabgabe
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run
2024-07-04 21:11:35 +02:00
Purplumbi504
24407a5c1c Revert test case directory: singleFeatureTests 2024-07-04 21:11:21 +02:00
2 changed files with 5 additions and 7 deletions

View File

@@ -438,9 +438,7 @@ class AstBuilderTest {
BlockNode testMethod3Block = new BlockNode(); BlockNode testMethod3Block = new BlockNode();
testMethod3Block.addStatement(new LocalVariableDeclarationNode(new ReferenceType("SelfReference"),"selfReference1", "=", new UnaryNode(new NewDeclarationNode("SelfReference")))); // Assing einfach "=" ? testMethod3Block.addStatement(new LocalVariableDeclarationNode(new ReferenceType("SelfReference"),"selfReference1", "=", new UnaryNode(new NewDeclarationNode("SelfReference")))); // Assing einfach "=" ?
MemberAccessNode methodAccess = new MemberAccessNode(false); MemberAccessNode methodAccess = new MemberAccessNode(false);
methodAccess.addIdentifier("selfReference1"); TargetNode methodTarget = new TargetNode("selfReference1");
methodAccess.addIdentifier("selfReference");
TargetNode methodTarget = new TargetNode(methodAccess);
testMethod3Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(methodTarget,"testMethod1")))); testMethod3Block.addStatement(new ReturnNode(new UnaryNode(new MethodCallNode(methodTarget,"testMethod1"))));
MethodNode testMethod3 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod3", testMethod3Block); MethodNode testMethod3 = new MethodNode("public", new BaseType(TypeEnum.INT), false, "testMethod3", testMethod3Block);

View File

@@ -1,4 +1,4 @@
class SelfReference{ class SelfReference {
SelfReference selfReference; SelfReference selfReference;
@@ -10,9 +10,9 @@ class SelfReference{
return 1; return 1;
} }
int testMethod3(){ int testMethod3() {
SelfReference selfReference1 = new SelfReference(); SelfReference selfReference1 = new SelfReference();
return selfReference1.selfReference.testMethod1(); return selfReference1.testMethod1();
} }
} }