Index: test/Common/DelftTools.TestUtils/TestHelper.cs
===================================================================
diff -u -r7eed8f9cfa868b199699b1fbf58bcde2c9271d84 -r716173ea7d18bb5436050eed3def1c53ac8f8aac
--- test/Common/DelftTools.TestUtils/TestHelper.cs (.../TestHelper.cs) (revision 7eed8f9cfa868b199699b1fbf58bcde2c9271d84)
+++ test/Common/DelftTools.TestUtils/TestHelper.cs (.../TestHelper.cs) (revision 716173ea7d18bb5436050eed3def1c53ac8f8aac)
@@ -210,73 +210,40 @@
}
///
- /// TODO: add machine benchmark/rank and use it as a weight when comparing test times, write rank to results file
- ///
- ///
- ///
- public static double AssertIsFasterThan(float maxMilliseconds, Action action)
- {
- return AssertIsFasterThan(maxMilliseconds, action, false);
- }
-
- public static double AssertIsFasterThan(float maxMilliseconds, bool warmUp, Action action)
- {
- return AssertIsFasterThan(maxMilliseconds, String.Empty, action, false, warmUp);
- }
-
- ///
///
///
///
///
/// Take HDD speed into account, makes sure that test timing is divided by MACHINE_HDD_PERFORMANCE_RANK environmental variable.
///
- public static double AssertIsFasterThan(float maxMilliseconds, Action action, bool rankHddAccess)
+ public static double AssertIsFasterThan(float maxMilliseconds, Action action, bool rankHddAccess = false)
{
- return AssertIsFasterThan(maxMilliseconds, null, action, rankHddAccess, false);
+ return AssertIsFasterThan(maxMilliseconds, null, action, rankHddAccess);
}
- public static double AssertIsFasterThan(float maxMilliseconds, string message, Action action)
- {
- return AssertIsFasterThan(maxMilliseconds, message, action, false, false);
- }
-
- public static double AssertIsFasterThan(float maxMilliseconds, Action action, bool rankHddAccess, bool warmUp)
- {
- return AssertIsFasterThan(maxMilliseconds, "assert timing", action, rankHddAccess, warmUp);
- }
-
///
///
///
///
///
///
/// Take HDD speed into account, makes sure that test timing is divided by MACHINE_HDD_PERFORMANCE_RANK environmental variable.
- ///
///
- public static double AssertIsFasterThan(float maxMilliseconds, string message, Action action, bool rankHddAccess, bool warmUp)
+ public static double AssertIsFasterThan(float maxMilliseconds, string message, Action action, bool rankHddAccess)
{
var stopwatch = new Stopwatch();
double actualMillisecond = default(double);
- for (int i = 0; i < (warmUp ? 3 : 1); i++)
- {
- stopwatch.Start();
- action();
- stopwatch.Stop();
+ stopwatch.Start();
+ action();
+ stopwatch.Stop();
- if (Math.Abs(actualMillisecond - default(double)) > 1e-5)
- {
- actualMillisecond = Math.Min(stopwatch.ElapsedMilliseconds, actualMillisecond);
- }
- else
- {
- actualMillisecond = stopwatch.ElapsedMilliseconds;
- }
- stopwatch.Reset();
- }
+ actualMillisecond = Math.Abs(actualMillisecond - default(double)) > 1e-5
+ ? Math.Min(stopwatch.ElapsedMilliseconds, actualMillisecond)
+ : stopwatch.ElapsedMilliseconds;
+ stopwatch.Reset();
+
string testName = GetCurrentTestClassMethodName();
if (testName == lastTestName) // check if there are more than one assert in a single test
Index: test/Common/DelftTools.Utils.Tests/Aop/EntityAttributeTest.cs
===================================================================
diff -u -r65f2e7d6ac377e64d885b6379ba3553a2deef981 -r716173ea7d18bb5436050eed3def1c53ac8f8aac
--- test/Common/DelftTools.Utils.Tests/Aop/EntityAttributeTest.cs (.../EntityAttributeTest.cs) (revision 65f2e7d6ac377e64d885b6379ba3553a2deef981)
+++ test/Common/DelftTools.Utils.Tests/Aop/EntityAttributeTest.cs (.../EntityAttributeTest.cs) (revision 716173ea7d18bb5436050eed3def1c53ac8f8aac)
@@ -234,18 +234,6 @@
[Entity]
public class Super : Base
{
- public override IEventedList AllElements
- {
- get
- {
- return base.AllElements;
- }
- set
- {
- base.AllElements = value;
- }
- }
-
///
/// override, but not calling base!
///
@@ -255,17 +243,6 @@
[Entity]
public class SuperSuper : Super
{
- public override IEventedList AllElements
- {
- get
- {
- return base.AllElements;
- }
- set
- {
- base.AllElements = value;
- }
- }
}
[Entity]
Fisheye: Tag 716173ea7d18bb5436050eed3def1c53ac8f8aac refers to a dead (removed) revision in file `test/Common/DelftTools.Utils.Tests/Aop/TestClasses/NotifiableTestClass.cs'.
Fisheye: No comparison available. Pass `N' to diff?
Index: test/Common/DelftTools.Utils.Tests/DelftTools.Utils.Tests.csproj
===================================================================
diff -u -r7eed8f9cfa868b199699b1fbf58bcde2c9271d84 -r716173ea7d18bb5436050eed3def1c53ac8f8aac
--- test/Common/DelftTools.Utils.Tests/DelftTools.Utils.Tests.csproj (.../DelftTools.Utils.Tests.csproj) (revision 7eed8f9cfa868b199699b1fbf58bcde2c9271d84)
+++ test/Common/DelftTools.Utils.Tests/DelftTools.Utils.Tests.csproj (.../DelftTools.Utils.Tests.csproj) (revision 716173ea7d18bb5436050eed3def1c53ac8f8aac)
@@ -83,7 +83,6 @@
-
Index: test/Common/NetTopologySuite.Extensions.Tests/Features/FeatureAttributeAccessorHelperTest.cs
===================================================================
diff -u -r5fc71a385897af92ccb092f2f969b5709afab85a -r716173ea7d18bb5436050eed3def1c53ac8f8aac
--- test/Common/NetTopologySuite.Extensions.Tests/Features/FeatureAttributeAccessorHelperTest.cs (.../FeatureAttributeAccessorHelperTest.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a)
+++ test/Common/NetTopologySuite.Extensions.Tests/Features/FeatureAttributeAccessorHelperTest.cs (.../FeatureAttributeAccessorHelperTest.cs) (revision 716173ea7d18bb5436050eed3def1c53ac8f8aac)
@@ -48,14 +48,11 @@
var testFeature = new TestFeature();
testFeature.Attributes = new DictionaryFeatureAttributeCollection();
- object value;
-
TestHelper.AssertIsFasterThan(70, () =>
{
for (int i = 0; i < 10000; i++)
{
- value = FeatureAttributeAccessorHelper.GetAttributeValue(
- testFeature, "Other", false);
+ FeatureAttributeAccessorHelper.GetAttributeValue(testFeature, "Other", false);
}
});
}
Index: test/DeltaShell/DeltaShell.IntegrationTests/DeltaShell/DeltaShell.Gui/DeltaShellGuiIntegrationTest.cs
===================================================================
diff -u -r5fc71a385897af92ccb092f2f969b5709afab85a -r716173ea7d18bb5436050eed3def1c53ac8f8aac
--- test/DeltaShell/DeltaShell.IntegrationTests/DeltaShell/DeltaShell.Gui/DeltaShellGuiIntegrationTest.cs (.../DeltaShellGuiIntegrationTest.cs) (revision 5fc71a385897af92ccb092f2f969b5709afab85a)
+++ test/DeltaShell/DeltaShell.IntegrationTests/DeltaShell/DeltaShell.Gui/DeltaShellGuiIntegrationTest.cs (.../DeltaShellGuiIntegrationTest.cs) (revision 716173ea7d18bb5436050eed3def1c53ac8f8aac)
@@ -302,7 +302,7 @@
gui.Run();
- Action onShown = () => TestHelper.AssertIsFasterThan(300, gui.Application.CreateNewProject, false);
+ Action onShown = () => TestHelper.AssertIsFasterThan(300, gui.Application.CreateNewProject);
WpfTestHelper.ShowModal((Control) gui.MainWindow, onShown);
}
@@ -333,7 +333,7 @@
}
app.SaveProjectAs(TestHelper.GetCurrentMethodName() + ".dsproj");
- TestHelper.AssertIsFasterThan(200, "exit gui is very fast", gui.Exit);
+ TestHelper.AssertIsFasterThan(200, gui.Exit);
}
}