Directory-Monitor... experimentell... klappt nicht so recht mit UNC-Pfaden :(

This commit is contained in:
Michael Schimmel
2025-07-17 16:21:13 +02:00
parent 208006c896
commit a896b7fcf0
4 changed files with 328 additions and 256 deletions
+1 -23
View File
@@ -27,9 +27,6 @@ type
[Test]
procedure TestFuncMutable_GetValue;
[Test]
procedure TestFuncMutable_Signal;
[Test]
[TestCase('Writeable', '10,20')]
procedure TestWriteableMutable(InitialValue, NewValue: Integer);
@@ -90,7 +87,7 @@ procedure TTestCoreMutable.TestNullMutable;
var
mutable: TMutable<Integer>;
begin
mutable := TMutable<Integer>.Create(TMycNullMutable<Integer>.Create(42));
mutable := TMutable<Integer>.Constant(42);
Assert.AreEqual(42, mutable.Value);
// Explicitly cast record helper to fully qualified interface for comparison
Assert.IsTrue(TSignal.ISignal(mutable.Changed) = TSignal.Null, 'Changed signal should be Null');
@@ -115,25 +112,6 @@ begin
Assert.AreEqual(1, callCount, 'Function should have been called once');
end;
procedure TTestCoreMutable.TestFuncMutable_Signal;
var
source: TEvent;
mutable: TMutable<Integer>;
lazy: TLazy<Integer>;
func: TFunc<Integer>;
begin
source := TEvent.CreateEvent;
func := function: Integer begin Result := 123; end;
mutable := TMutable<Integer>.Construct(source.Signal, func);
lazy := TLazy<Integer>.Create(mutable);
Assert.IsFalse(lazy.Update, 'Lazy wrapper should not detect a change initially.');
source.Notify;
Assert.IsTrue(lazy.Update, 'Lazy wrapper should detect the change after signal.');
end;
procedure TTestCoreMutable.TestWriteableMutable(InitialValue, NewValue: Integer);
var
writeable: TWriteable<Integer>;