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
+2 -1
View File
@@ -29,7 +29,8 @@ uses
Myc.Trade.Node in '..\Src\Myc.Trade.Node.pas',
Myc.Trade.DataStream in '..\Src\Myc.Trade.DataStream.pas',
Myc.Mutable in '..\Src\Myc.Mutable.pas',
Test.Core.Mutable in 'Test.Core.Mutable.pas';
Test.Core.Mutable in 'Test.Core.Mutable.pas',
Tests.Myc.DirectoryMonitor in 'Tests.Myc.DirectoryMonitor.pas';
{ keep comment here to protect the following conditional from being removed by the IDE when adding a unit }
{$IFNDEF TESTINSIGHT}
+1
View File
@@ -130,6 +130,7 @@ $(PreBuildEvent)]]></PreBuildEvent>
<DCCReference Include="..\Src\Myc.Trade.DataStream.pas"/>
<DCCReference Include="..\Src\Myc.Mutable.pas"/>
<DCCReference Include="Test.Core.Mutable.pas"/>
<DCCReference Include="Tests.Myc.DirectoryMonitor.pas"/>
<BuildConfiguration Include="Base">
<Key>Base</Key>
</BuildConfiguration>
+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>;