From 2175a114831de504152d93f259b6ca1cb61d9475 Mon Sep 17 00:00:00 2001 From: SteveGilham Date: Wed, 3 Jan 2024 16:28:06 +0000 Subject: [PATCH] Fix/simplify and tidy up --- AltCover.Engine/Instrument.fs | 9 +++------ AltCover.Monitor.Tests/MonitorTest.fs | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/AltCover.Engine/Instrument.fs b/AltCover.Engine/Instrument.fs index 1c1a4b76..17685ed7 100644 --- a/AltCover.Engine/Instrument.fs +++ b/AltCover.Engine/Instrument.fs @@ -253,11 +253,7 @@ module internal Instrument = let attrtype = va |> Seq.tryHead let injectRef (ref: string) = - let constructor = - attrtype.Value.AttributeType - .Resolve() - .GetConstructors() - |> Seq.head + let constructor = attrtype.Value.Constructor let blob = System.Collections.Generic.List(System.Text.Encoding.ASCII.GetBytes(ref)) @@ -1484,6 +1480,7 @@ module internal Instrument = [] () \ No newline at end of file diff --git a/AltCover.Monitor.Tests/MonitorTest.fs b/AltCover.Monitor.Tests/MonitorTest.fs index 3e050eb2..6997a9dd 100644 --- a/AltCover.Monitor.Tests/MonitorTest.fs +++ b/AltCover.Monitor.Tests/MonitorTest.fs @@ -84,7 +84,7 @@ module MonitorTests = test' <@ - code > 115 + code > 112 && code < 261 && branch > 24 && branch < 38