type SomeRecord = { A : int }
testCase "contained within" <| fun () ->
let validValues = [4; 8; 15; 16; 23; 42] |> List.map (fun p -> { A = p })
let value = Mutable.create <| List.last validValues
let validated =
value
|> Signal.validate (Validation.Validators.containedWithin validValues)
value.Value <- { A = -1 }
[22:11:55 ERR] gjallarhorn/validators/contained within errored in 00:00:00.2770000 <Expecto>
System.FormatException: Входная строка имела неверный формат.
в System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
в System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
в Gjallarhorn.ValidationModule.validateWith[a](FSharpFunc`2 validator, ValidationCollector`1 step)
в Gjallarhorn.ValidationModule.Validators.containedWithin[a](IEnumerable`1 collection, ValidationCollector`1 step)
в [email protected](ValidationCollector`1 step) в ...\Gjallarhorn.Tests.fs:строка 64
в Gjallarhorn.SignalModule.ValidatorMappingSignal`2.validateCurrent(a value)
в Gjallarhorn.SignalModule.ValidatorMappingSignal`2.Update[a](a source)
в <StartupCode$Gjallarhorn>[email protected](IDependent dep)
в Gjallarhorn.Internal.WeakRef.execute[a](FSharpFunc`2 f, WeakReference`1 wr)
в <StartupCode$Gjallarhorn>[email protected](WeakReference`1 wr)
в Microsoft.FSharp.Collections.ArrayModule.Filter.createMask[a](FSharpFunc`2 f, a[] src, UInt32[]& maskArrayOut, UInt32& leftoverMaskOut)
в Microsoft.FSharp.Collections.ArrayModule.Filter.filter[a](FSharpFunc`2 f, a[] src)
в Microsoft.FSharp.Collections.ArrayModule.Filter[T](FSharpFunc`2 predicate, T[] array)
в Gjallarhorn.Internal.DependencyTracker`1.signalAndUpdateDependencies(ISignal`1 source)
в Gjallarhorn.Internal.DependencyTracker`1.MarkDirty(ISignal`1 source)
в Gjallarhorn.Internal.SignalManager.Signal[a](ISignal`1 source)
в Gjallarhorn.Internal.Dependencies.createRemote@247.Gjallarhorn-Internal-IDependencyManager`1-MarkDirty(ISignal`1 source)
в Gjallarhorn.Internal.Mutable`1.set_Value(a value)
в [email protected](Unit unitVar0) в ...\Gjallarhorn.Tests.fs:строка 65
в [email protected](Unit unitVar)
в Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
в <StartupCode$FSharp-Core>[email protected](AsyncActivation`1 ctxt)
в Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)
[22:38:37 ERR] gjallarhorn/validators/String.Format + string record errored in 00:00:00.1010000 <Expecto>
System.FormatException: Входная строка имела неверный формат.
в System.Text.StringBuilder.AppendFormatHelper(IFormatProvider provider, String format, ParamsArray args)
в System.String.FormatHelper(IFormatProvider provider, String format, ParamsArray args)
в System.String.Format(String format, Object arg0)
в [email protected](Unit unitVar0) в ...\Gjallarhorn.Tests.fs:строка 68
в [email protected](Unit unitVar)
в Microsoft.FSharp.Control.AsyncPrimitives.CallThenInvoke[T,TResult](AsyncActivation`1 ctxt, TResult result1, FSharpFunc`2 part2)
в <StartupCode$FSharp-Core>[email protected](AsyncActivation`1 ctxt)
в Microsoft.FSharp.Control.Trampoline.Execute(FSharpFunc`2 firstAction)