mirror of
https://github.com/Smaug123/unofficial-nunit-runner
synced 2025-10-06 09:48:40 +00:00
Compare commits
3 Commits
WoofWare.N
...
WoofWare.N
Author | SHA1 | Date | |
---|---|---|---|
|
eb4dfae8f4 | ||
|
78f51d127c | ||
|
3866823ccd |
@@ -291,9 +291,10 @@ module Filter =
|
||||
fun a b -> inner1 a b || inner2 a b
|
||||
| Filter.Name (Match.Exact m) -> fun _fixture method -> method.Method.Name = m
|
||||
| Filter.Name (Match.Contains m) -> fun _fixture method -> method.Method.Name.Contains m
|
||||
| Filter.FullyQualifiedName (Match.Exact m) -> fun fixture method -> (fixture.Name + method.Method.Name) = m
|
||||
| Filter.FullyQualifiedName (Match.Exact m) ->
|
||||
fun _fixture method -> (method.Method.DeclaringType.FullName + "." + method.Method.Name) = m
|
||||
| Filter.FullyQualifiedName (Match.Contains m) ->
|
||||
fun fixture method -> (fixture.Name + method.Method.Name).Contains m
|
||||
fun _fixture method -> (method.Method.DeclaringType.FullName + "." + method.Method.Name).Contains m
|
||||
| Filter.TestCategory (Match.Contains m) ->
|
||||
fun _fixture method -> method.Categories |> List.exists (fun cat -> cat.Contains m)
|
||||
| Filter.TestCategory (Match.Exact m) -> fun _fixture method -> method.Categories |> List.contains m
|
||||
|
@@ -230,6 +230,27 @@ module TestFixture =
|
||||
(test : SingleTestMethod)
|
||||
: (Result<TestMemberSuccess, TestMemberFailure> * IndividualTestRunMetadata) list
|
||||
=
|
||||
if test.Method.ContainsGenericParameters then
|
||||
let failureMetadata =
|
||||
{
|
||||
Total = TimeSpan.Zero
|
||||
Start = DateTimeOffset.Now
|
||||
End = DateTimeOffset.Now
|
||||
ComputerName = Environment.MachineName
|
||||
ExecutionId = Guid.NewGuid ()
|
||||
TestId = Guid.NewGuid ()
|
||||
TestName = test.Name
|
||||
ClassName = test.Method.DeclaringType.FullName
|
||||
StdErr = None
|
||||
StdOut = None
|
||||
}
|
||||
|
||||
let error =
|
||||
TestMemberFailure.Malformed [ "Test contained generic parameters; generics are not supported." ]
|
||||
|
||||
(Error error, failureMetadata) |> List.singleton
|
||||
else
|
||||
|
||||
let resultPreRun =
|
||||
(None, test.Modifiers)
|
||||
||> List.fold (fun _result modifier ->
|
||||
|
@@ -401,6 +401,7 @@ module Program =
|
||||
let contents = TrxReport.toXml report |> fun d -> d.OuterXml
|
||||
trxPath.Directory.Create ()
|
||||
File.WriteAllText (trxPath.FullName, contents)
|
||||
Console.Error.WriteLine $"Written TRX file: %s{trxPath.FullName}"
|
||||
| None -> ()
|
||||
|
||||
match outcome with
|
||||
|
Reference in New Issue
Block a user