lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/2] lucenenet git commit: Another LongRunningTest backed by a shorter one
Date Thu, 05 Feb 2015 17:10:28 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 086ef2e02 -> 5e9250f84


Another LongRunningTest backed by a shorter one


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/903d8857
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/903d8857
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/903d8857

Branch: refs/heads/master
Commit: 903d88578b2ffbcc40c203d7673881005f92db5a
Parents: 086ef2e
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Thu Feb 5 18:17:37 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Thu Feb 5 18:17:37 2015 +0200

----------------------------------------------------------------------
 .../core/Util/Packed/TestEliasFanoSequence.cs   | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/903d8857/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
index a34d321..3fc1717 100644
--- a/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
+++ b/src/Lucene.Net.Tests/core/Util/Packed/TestEliasFanoSequence.cs
@@ -1,3 +1,4 @@
+using Lucene.Net.Attributes;
 using NUnit.Framework;
 using System;
 using System.Diagnostics;
@@ -307,10 +308,25 @@ namespace Lucene.Net.Util.Packed
         [Test]
         public virtual void TestStrictMonotoneSequences()
         {
-            // for (int s = 2; s < 1222; s++) {
+            for (int s = 2; s < 1222; s++)
+            {
+                var values = new long[s];
+                for (int i = 0; i < s; i++)
+                {
+                    values[i] = i * ((long)i - 1) / 2; // Add a gap of (s-1) to previous
+                    // s = (s*(s+1) - (s-1)*s)/2
+                }
+                TstEFS2(values);
+            }
+        }
+
+        [Test]
+        [LongRunningTest]
+        public virtual void TestStrictMonotoneSequencesLonger()
+        {
             for (int s = 2; s < 4422; s++)
             {
-                long[] values = new long[s];
+                var values = new long[s];
                 for (int i = 0; i < s; i++)
                 {
                     values[i] = i * ((long)i - 1) / 2; // Add a gap of (s-1) to previous


Mime
View raw message