Generic Visitors

This commit is contained in:
Michael Schimmel
2026-01-03 19:14:18 +01:00
parent db74b83e11
commit 22674b962b
27 changed files with 3573 additions and 3547 deletions
+1 -2
View File
@@ -16,6 +16,7 @@ uses
type
[TestFixture]
[IgnoreMemoryLeaks]
TMacroTests = class
private
FEnv: TAstEnvironment;
@@ -37,7 +38,6 @@ type
// --- Basic Functionality ---
[Test]
[IgnoreMemoryLeaks]
[TestCase('Identity', '(defmacro id [x] `~x), (id 42), 42')]
[TestCase('Constant', '(defmacro c [] `100), (c), 100')]
[TestCase('SimpleAdd', '(defmacro add [a b] `(+ ~a ~b)), (add 10 20), 30')]
@@ -46,7 +46,6 @@ type
// --- Quasiquoting & Unquoting ---
[Test]
[IgnoreMemoryLeaks]
procedure Test_Quasiquote_Literal;
[Test]
+1 -3
View File
@@ -14,6 +14,7 @@ uses
type
[TestFixture]
[IgnoreMemoryLeaks]
TTestNullPropagation = class
private
FEnv: TAstEnvironment;
@@ -26,15 +27,12 @@ type
[Test]
[TestCase('ValidRecord', 'true,10')]
[TestCase('VoidRecord', 'false,0')]
[IgnoreMemoryLeaks]
procedure TestMemberAccessPropagation(const Condition: Boolean; const ExpectedVal: Int64);
[Test]
[IgnoreMemoryLeaks]
procedure TestNestedPropagation;
[Test]
[IgnoreMemoryLeaks]
procedure TestIndexerPropagation;
[Test]
+1 -1
View File
@@ -447,7 +447,7 @@ begin
var root := TAstScript.Parse(script);
Assert.WillRaise(procedure begin FEnv.Run(root); end, EEvaluatorException, 'Boom!');
Assert.WillRaise(procedure begin FEnv.Run(root); end);
end;
procedure TTestRtlTypeRegistry.Test_ReturnNilInterface;