Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/guiunit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Hamons <chris.hamons@xamarin.com>2014-05-14 20:09:42 +0400
committerChris Hamons <chris.hamons@xamarin.com>2014-05-14 20:09:42 +0400
commite6ce4d81067b8b9085947f16bd0236636ad91813 (patch)
treedfd0df9409581cf0f1aeb9e0348ddeac17388ab4
parentacbd73e0c808664cf7c39788e559ee199ceb3da1 (diff)
Report if -run: filter matches zero tests instead of reporting success
-rw-r--r--.gitignore2
-rwxr-xr-xsrc/framework/Internal/Filters/SimpleNameFilter.cs15
-rwxr-xr-xsrc/framework/Internal/WorkItems/CompositeWorkItem.cs5
3 files changed, 22 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore
index 0170ed7..75bb6e8 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
bin
src/framework/GuiUnit.userprefs
src/framework/obj/*
+*.userprefs
+src/TestResultConsole/obj/*
diff --git a/src/framework/Internal/Filters/SimpleNameFilter.cs b/src/framework/Internal/Filters/SimpleNameFilter.cs
index 6deecf5..becc675 100755
--- a/src/framework/Internal/Filters/SimpleNameFilter.cs
+++ b/src/framework/Internal/Filters/SimpleNameFilter.cs
@@ -22,6 +22,9 @@
// ***********************************************************************
using System;
+using System.Text;
+
+
#if CLR_2_0 || CLR_4_0
using System.Collections.Generic;
#endif
@@ -88,5 +91,17 @@ namespace NUnit.Framework.Internal.Filters
return true;
return false;
}
+
+ /// <summary>
+ /// Returns a <see cref="System.String"/> that represents the current <see cref="NUnit.Framework.Internal.Filters.SimpleNameFilter"/>.
+ /// </summary>
+ /// <returns>A <see cref="System.String"/> that represents the current <see cref="NUnit.Framework.Internal.Filters.SimpleNameFilter"/>.</returns>
+ public override string ToString ()
+ {
+ StringBuilder s = new StringBuilder("[SimpleNameFilter]: ");
+ foreach (var name in names)
+ s.Append (name + " ");
+ return s.ToString ();
+ }
}
}
diff --git a/src/framework/Internal/WorkItems/CompositeWorkItem.cs b/src/framework/Internal/WorkItems/CompositeWorkItem.cs
index 0438fad..c8a2a7a 100755
--- a/src/framework/Internal/WorkItems/CompositeWorkItem.cs
+++ b/src/framework/Internal/WorkItems/CompositeWorkItem.cs
@@ -88,6 +88,11 @@ namespace NUnit.Framework.Internal.WorkItems
RunChildren();
return;
}
+ else
+ {
+ Console.WriteLine("No tests found that match filter: " + _childFilter.ToString() + "\n");
+ Result.SetResult(ResultState.Inconclusive);
+ }
}
// Fall through in case there were no child tests to run.