lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [17/20] lucenenet git commit: Lucene.Net.Tests.Expressions: Fixed namespaces and usings
Date Tue, 28 Feb 2017 12:30:08 GMT
Lucene.Net.Tests.Expressions: Fixed namespaces and usings


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

Branch: refs/heads/api-work
Commit: 51e3957ccbf5b753449b43ad4611936af8481042
Parents: 3ad36c4
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Tue Feb 28 18:24:23 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Feb 28 18:24:23 2017 +0700

----------------------------------------------------------------------
 .../JS/TestCustomFunctions.cs                   |  13 +-
 .../JS/TestJavascriptCompiler.cs                |   8 +-
 .../JS/TestJavascriptFunction.cs                | 557 +++++++++----------
 .../JS/TestJavascriptOperations.cs              |   7 +-
 .../Lucene.Net.Tests.Expressions.csproj         |   2 +-
 .../TestApiConsistency.cs                       |   2 +-
 .../TestDemoExpressions.cs                      |  11 +-
 .../TestExpressionRescorer.cs                   |   6 +-
 .../TestExpressionSortField.cs                  |   6 +-
 .../TestExpressionSorts.cs                      |   5 +-
 .../TestExpressionValidation.cs                 |  10 +-
 .../TestExpressionValueSource.cs                |   8 +-
 12 files changed, 315 insertions(+), 320 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/JS/TestCustomFunctions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/JS/TestCustomFunctions.cs b/src/Lucene.Net.Tests.Expressions/JS/TestCustomFunctions.cs
index 22e8f12..8d98e35 100644
--- a/src/Lucene.Net.Tests.Expressions/JS/TestCustomFunctions.cs
+++ b/src/Lucene.Net.Tests.Expressions/JS/TestCustomFunctions.cs
@@ -1,16 +1,15 @@
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+using NUnit.Framework;
 using System;
 using System.Collections.Generic;
 using System.IO;
-using System.Linq.Expressions;
 using System.Reflection;
-using Lucene.Net.Expressions.JS;
-using Lucene.Net.Support;
-using NUnit.Framework;
 
-namespace Lucene.Net.Tests.Expressions.JS
+namespace Lucene.Net.Expressions.JS
 {
-	[TestFixture]
-	public class TestCustomFunctions : Util.LuceneTestCase
+    [TestFixture]
+	public class TestCustomFunctions : LuceneTestCase
 	{
 		private static double DELTA = 0.0000001;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptCompiler.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptCompiler.cs b/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptCompiler.cs
index 41da6b3..730e057 100644
--- a/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptCompiler.cs
+++ b/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptCompiler.cs
@@ -1,10 +1,10 @@
-using System;
-using Lucene.Net.Expressions.JS;
+using Lucene.Net.Util;
 using NUnit.Framework;
+using System;
 
-namespace Lucene.Net.Tests.Expressions.JS
+namespace Lucene.Net.Expressions.JS
 {
-	public class TestJavascriptCompiler : Util.LuceneTestCase
+    public class TestJavascriptCompiler : LuceneTestCase
 	{
 		[Test]
 		public virtual void TestValidCompiles()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptFunction.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptFunction.cs b/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptFunction.cs
index 3d39f1d..66f6bab 100644
--- a/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptFunction.cs
+++ b/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptFunction.cs
@@ -1,309 +1,308 @@
-using System;
-using Lucene.Net.Expressions;
-using Lucene.Net.Expressions.JS;
+using Lucene.Net.Util;
 using NUnit.Framework;
+using System;
 
-namespace Lucene.Net.Tests.Expressions.JS
+namespace Lucene.Net.Expressions.JS
 {
-	public class TestJavascriptFunction : Util.LuceneTestCase
-	{
-		private static double DELTA = 0.0000001;
+    public class TestJavascriptFunction : LuceneTestCase
+    {
+        private static double DELTA = 0.0000001;
+
 
-		
-		private void AssertEvaluatesTo(string expression, double expected)
-		{
-			Expression evaluator = JavascriptCompiler.Compile(expression);
-			double actual = evaluator.Evaluate(0, null);
-			AreEqual(expected, actual, DELTA);
-		}
+        private void AssertEvaluatesTo(string expression, double expected)
+        {
+            Expression evaluator = JavascriptCompiler.Compile(expression);
+            double actual = evaluator.Evaluate(0, null);
+            AreEqual(expected, actual, DELTA);
+        }
 
-		[Test]
-		public virtual void TestAbsMethod()
-		{
-			AssertEvaluatesTo("abs(0)", 0);
-			AssertEvaluatesTo("abs(119)", 119);
-			AssertEvaluatesTo("abs(119)", 119);
-			AssertEvaluatesTo("abs(1)", 1);
-			AssertEvaluatesTo("abs(-1)", 1);
-		}
+        [Test]
+        public virtual void TestAbsMethod()
+        {
+            AssertEvaluatesTo("abs(0)", 0);
+            AssertEvaluatesTo("abs(119)", 119);
+            AssertEvaluatesTo("abs(119)", 119);
+            AssertEvaluatesTo("abs(1)", 1);
+            AssertEvaluatesTo("abs(-1)", 1);
+        }
 
-		[Test]
-		public virtual void TestAcosMethod()
-		{
-			AssertEvaluatesTo("acos(-1)", Math.PI);
-			AssertEvaluatesTo("acos(-0.8660254)", Math.PI * 5 / 6);
-			AssertEvaluatesTo("acos(-0.7071068)", Math.PI * 3 / 4);
-			AssertEvaluatesTo("acos(-0.5)", Math.PI * 2 / 3);
-			AssertEvaluatesTo("acos(0)", Math.PI / 2);
-			AssertEvaluatesTo("acos(0.5)", Math.PI / 3);
-			AssertEvaluatesTo("acos(0.7071068)", Math.PI / 4);
-			AssertEvaluatesTo("acos(0.8660254)", Math.PI / 6);
-			AssertEvaluatesTo("acos(1)", 0);
-		}
+        [Test]
+        public virtual void TestAcosMethod()
+        {
+            AssertEvaluatesTo("acos(-1)", Math.PI);
+            AssertEvaluatesTo("acos(-0.8660254)", Math.PI * 5 / 6);
+            AssertEvaluatesTo("acos(-0.7071068)", Math.PI * 3 / 4);
+            AssertEvaluatesTo("acos(-0.5)", Math.PI * 2 / 3);
+            AssertEvaluatesTo("acos(0)", Math.PI / 2);
+            AssertEvaluatesTo("acos(0.5)", Math.PI / 3);
+            AssertEvaluatesTo("acos(0.7071068)", Math.PI / 4);
+            AssertEvaluatesTo("acos(0.8660254)", Math.PI / 6);
+            AssertEvaluatesTo("acos(1)", 0);
+        }
 
-		[Test]
-		public virtual void TestAcoshMethod()
-		{
-			AssertEvaluatesTo("acosh(1)", 0);
-			AssertEvaluatesTo("acosh(2.5)", 1.5667992369724109);
-			AssertEvaluatesTo("acosh(1234567.89)", 14.719378760739708);
-		}
+        [Test]
+        public virtual void TestAcoshMethod()
+        {
+            AssertEvaluatesTo("acosh(1)", 0);
+            AssertEvaluatesTo("acosh(2.5)", 1.5667992369724109);
+            AssertEvaluatesTo("acosh(1234567.89)", 14.719378760739708);
+        }
 
-		[Test]
-		public virtual void TestAsinMethod()
-		{
-			AssertEvaluatesTo("asin(-1)", -Math.PI / 2);
-			AssertEvaluatesTo("asin(-0.8660254)", -Math.PI / 3);
-			AssertEvaluatesTo("asin(-0.7071068)", -Math.PI / 4);
-			AssertEvaluatesTo("asin(-0.5)", -Math.PI / 6);
-			AssertEvaluatesTo("asin(0)", 0);
-			AssertEvaluatesTo("asin(0.5)", Math.PI / 6);
-			AssertEvaluatesTo("asin(0.7071068)", Math.PI / 4);
-			AssertEvaluatesTo("asin(0.8660254)", Math.PI / 3);
-			AssertEvaluatesTo("asin(1)", Math.PI / 2);
-		}
+        [Test]
+        public virtual void TestAsinMethod()
+        {
+            AssertEvaluatesTo("asin(-1)", -Math.PI / 2);
+            AssertEvaluatesTo("asin(-0.8660254)", -Math.PI / 3);
+            AssertEvaluatesTo("asin(-0.7071068)", -Math.PI / 4);
+            AssertEvaluatesTo("asin(-0.5)", -Math.PI / 6);
+            AssertEvaluatesTo("asin(0)", 0);
+            AssertEvaluatesTo("asin(0.5)", Math.PI / 6);
+            AssertEvaluatesTo("asin(0.7071068)", Math.PI / 4);
+            AssertEvaluatesTo("asin(0.8660254)", Math.PI / 3);
+            AssertEvaluatesTo("asin(1)", Math.PI / 2);
+        }
 
-		[Test]
-		public virtual void TestAsinhMethod()
-		{
-			AssertEvaluatesTo("asinh(-1234567.89)", -14.719378760740035);
-			AssertEvaluatesTo("asinh(-2.5)", -1.6472311463710958);
-			AssertEvaluatesTo("asinh(-1)", -0.8813735870195429);
-			AssertEvaluatesTo("asinh(0)", 0);
-			AssertEvaluatesTo("asinh(1)", 0.8813735870195429);
-			AssertEvaluatesTo("asinh(2.5)", 1.6472311463710958);
-			AssertEvaluatesTo("asinh(1234567.89)", 14.719378760740035);
-		}
+        [Test]
+        public virtual void TestAsinhMethod()
+        {
+            AssertEvaluatesTo("asinh(-1234567.89)", -14.719378760740035);
+            AssertEvaluatesTo("asinh(-2.5)", -1.6472311463710958);
+            AssertEvaluatesTo("asinh(-1)", -0.8813735870195429);
+            AssertEvaluatesTo("asinh(0)", 0);
+            AssertEvaluatesTo("asinh(1)", 0.8813735870195429);
+            AssertEvaluatesTo("asinh(2.5)", 1.6472311463710958);
+            AssertEvaluatesTo("asinh(1234567.89)", 14.719378760740035);
+        }
 
-		[Test]
-		public virtual void TestAtanMethod()
-		{
-			AssertEvaluatesTo("atan(-1.732050808)", -Math.PI / 3);
-			AssertEvaluatesTo("atan(-1)", -Math.PI / 4);
-			AssertEvaluatesTo("atan(-0.577350269)", -Math.PI / 6);
-			AssertEvaluatesTo("atan(0)", 0);
-			AssertEvaluatesTo("atan(0.577350269)", Math.PI / 6);
-			AssertEvaluatesTo("atan(1)", Math.PI / 4);
-			AssertEvaluatesTo("atan(1.732050808)", Math.PI / 3);
-		}
+        [Test]
+        public virtual void TestAtanMethod()
+        {
+            AssertEvaluatesTo("atan(-1.732050808)", -Math.PI / 3);
+            AssertEvaluatesTo("atan(-1)", -Math.PI / 4);
+            AssertEvaluatesTo("atan(-0.577350269)", -Math.PI / 6);
+            AssertEvaluatesTo("atan(0)", 0);
+            AssertEvaluatesTo("atan(0.577350269)", Math.PI / 6);
+            AssertEvaluatesTo("atan(1)", Math.PI / 4);
+            AssertEvaluatesTo("atan(1.732050808)", Math.PI / 3);
+        }
 
-		[Test]
-		public virtual void TestAtan2Method()
-		{
-			AssertEvaluatesTo("atan2(+0,+0)", +0.0);
-			AssertEvaluatesTo("atan2(+0,-0)", +Math.PI);
-			AssertEvaluatesTo("atan2(-0,+0)", -0.0);
-			AssertEvaluatesTo("atan2(-0,-0)", -Math.PI);
-			AssertEvaluatesTo("atan2(2,2)", Math.PI / 4);
-			AssertEvaluatesTo("atan2(-2,2)", -Math.PI / 4);
-			AssertEvaluatesTo("atan2(2,-2)", Math.PI * 3 / 4);
-			AssertEvaluatesTo("atan2(-2,-2)", -Math.PI * 3 / 4);
-		}
+        [Test]
+        public virtual void TestAtan2Method()
+        {
+            AssertEvaluatesTo("atan2(+0,+0)", +0.0);
+            AssertEvaluatesTo("atan2(+0,-0)", +Math.PI);
+            AssertEvaluatesTo("atan2(-0,+0)", -0.0);
+            AssertEvaluatesTo("atan2(-0,-0)", -Math.PI);
+            AssertEvaluatesTo("atan2(2,2)", Math.PI / 4);
+            AssertEvaluatesTo("atan2(-2,2)", -Math.PI / 4);
+            AssertEvaluatesTo("atan2(2,-2)", Math.PI * 3 / 4);
+            AssertEvaluatesTo("atan2(-2,-2)", -Math.PI * 3 / 4);
+        }
 
-		[Test]
-		public virtual void TestAtanhMethod()
-		{
-			AssertEvaluatesTo("atanh(-1)", double.NegativeInfinity);
-			AssertEvaluatesTo("atanh(-0.5)", -0.5493061443340549);
-			AssertEvaluatesTo("atanh(0)", 0);
-			AssertEvaluatesTo("atanh(0.5)", 0.5493061443340549);
-			AssertEvaluatesTo("atanh(1)", double.PositiveInfinity);
-		}
+        [Test]
+        public virtual void TestAtanhMethod()
+        {
+            AssertEvaluatesTo("atanh(-1)", double.NegativeInfinity);
+            AssertEvaluatesTo("atanh(-0.5)", -0.5493061443340549);
+            AssertEvaluatesTo("atanh(0)", 0);
+            AssertEvaluatesTo("atanh(0.5)", 0.5493061443340549);
+            AssertEvaluatesTo("atanh(1)", double.PositiveInfinity);
+        }
 
-		[Test]
-		public virtual void TestCeilMethod()
-		{
-			AssertEvaluatesTo("ceil(0)", 0);
-			AssertEvaluatesTo("ceil(0.1)", 1);
-			AssertEvaluatesTo("ceil(0.9)", 1);
-			AssertEvaluatesTo("ceil(25.2)", 26);
-			AssertEvaluatesTo("ceil(-0.1)", 0);
-			AssertEvaluatesTo("ceil(-0.9)", 0);
-			AssertEvaluatesTo("ceil(-1.1)", -1);
-		}
+        [Test]
+        public virtual void TestCeilMethod()
+        {
+            AssertEvaluatesTo("ceil(0)", 0);
+            AssertEvaluatesTo("ceil(0.1)", 1);
+            AssertEvaluatesTo("ceil(0.9)", 1);
+            AssertEvaluatesTo("ceil(25.2)", 26);
+            AssertEvaluatesTo("ceil(-0.1)", 0);
+            AssertEvaluatesTo("ceil(-0.9)", 0);
+            AssertEvaluatesTo("ceil(-1.1)", -1);
+        }
 
-		[Test]
-		public virtual void TestCosMethod()
-		{
-			AssertEvaluatesTo("cos(0)", 1);
-			AssertEvaluatesTo("cos(" + Math.PI / 2 + ")", 0);
-			AssertEvaluatesTo("cos(" + -Math.PI / 2 + ")", 0);
-			AssertEvaluatesTo("cos(" + Math.PI / 4 + ")", 0.7071068);
-			AssertEvaluatesTo("cos(" + -Math.PI / 4 + ")", 0.7071068);
-			AssertEvaluatesTo("cos(" + Math.PI * 2 / 3 + ")", -0.5);
-			AssertEvaluatesTo("cos(" + -Math.PI * 2 / 3 + ")", -0.5);
-			AssertEvaluatesTo("cos(" + Math.PI / 6 + ")", 0.8660254);
-			AssertEvaluatesTo("cos(" + -Math.PI / 6 + ")", 0.8660254);
-		}
+        [Test]
+        public virtual void TestCosMethod()
+        {
+            AssertEvaluatesTo("cos(0)", 1);
+            AssertEvaluatesTo("cos(" + Math.PI / 2 + ")", 0);
+            AssertEvaluatesTo("cos(" + -Math.PI / 2 + ")", 0);
+            AssertEvaluatesTo("cos(" + Math.PI / 4 + ")", 0.7071068);
+            AssertEvaluatesTo("cos(" + -Math.PI / 4 + ")", 0.7071068);
+            AssertEvaluatesTo("cos(" + Math.PI * 2 / 3 + ")", -0.5);
+            AssertEvaluatesTo("cos(" + -Math.PI * 2 / 3 + ")", -0.5);
+            AssertEvaluatesTo("cos(" + Math.PI / 6 + ")", 0.8660254);
+            AssertEvaluatesTo("cos(" + -Math.PI / 6 + ")", 0.8660254);
+        }
 
-		[Test]
-		public virtual void TestCoshMethod()
-		{
-			AssertEvaluatesTo("cosh(0)", 1);
-			AssertEvaluatesTo("cosh(-1)", 1.5430806348152437);
-			AssertEvaluatesTo("cosh(1)", 1.5430806348152437);
-			AssertEvaluatesTo("cosh(-0.5)", 1.1276259652063807);
-			AssertEvaluatesTo("cosh(0.5)", 1.1276259652063807);
-			AssertEvaluatesTo("cosh(-12.3456789)", 114982.09728671524);
-			AssertEvaluatesTo("cosh(12.3456789)", 114982.09728671524);
-		}
+        [Test]
+        public virtual void TestCoshMethod()
+        {
+            AssertEvaluatesTo("cosh(0)", 1);
+            AssertEvaluatesTo("cosh(-1)", 1.5430806348152437);
+            AssertEvaluatesTo("cosh(1)", 1.5430806348152437);
+            AssertEvaluatesTo("cosh(-0.5)", 1.1276259652063807);
+            AssertEvaluatesTo("cosh(0.5)", 1.1276259652063807);
+            AssertEvaluatesTo("cosh(-12.3456789)", 114982.09728671524);
+            AssertEvaluatesTo("cosh(12.3456789)", 114982.09728671524);
+        }
 
-		[Test]
-		public virtual void TestExpMethod()
-		{
-			AssertEvaluatesTo("exp(0)", 1);
-			AssertEvaluatesTo("exp(-1)", 0.36787944117);
-			AssertEvaluatesTo("exp(1)", 2.71828182846);
-			AssertEvaluatesTo("exp(-0.5)", 0.60653065971);
-			AssertEvaluatesTo("exp(0.5)", 1.6487212707);
-			AssertEvaluatesTo("exp(-12.3456789)", 0.0000043485);
-			AssertEvaluatesTo("exp(12.3456789)", 229964.194569);
-		}
+        [Test]
+        public virtual void TestExpMethod()
+        {
+            AssertEvaluatesTo("exp(0)", 1);
+            AssertEvaluatesTo("exp(-1)", 0.36787944117);
+            AssertEvaluatesTo("exp(1)", 2.71828182846);
+            AssertEvaluatesTo("exp(-0.5)", 0.60653065971);
+            AssertEvaluatesTo("exp(0.5)", 1.6487212707);
+            AssertEvaluatesTo("exp(-12.3456789)", 0.0000043485);
+            AssertEvaluatesTo("exp(12.3456789)", 229964.194569);
+        }
 
-		[Test]
-		public virtual void TestFloorMethod()
-		{
-			AssertEvaluatesTo("floor(0)", 0);
-			AssertEvaluatesTo("floor(0.1)", 0);
-			AssertEvaluatesTo("floor(0.9)", 0);
-			AssertEvaluatesTo("floor(25.2)", 25);
-			AssertEvaluatesTo("floor(-0.1)", -1);
-			AssertEvaluatesTo("floor(-0.9)", -1);
-			AssertEvaluatesTo("floor(-1.1)", -2);
-		}
+        [Test]
+        public virtual void TestFloorMethod()
+        {
+            AssertEvaluatesTo("floor(0)", 0);
+            AssertEvaluatesTo("floor(0.1)", 0);
+            AssertEvaluatesTo("floor(0.9)", 0);
+            AssertEvaluatesTo("floor(25.2)", 25);
+            AssertEvaluatesTo("floor(-0.1)", -1);
+            AssertEvaluatesTo("floor(-0.9)", -1);
+            AssertEvaluatesTo("floor(-1.1)", -2);
+        }
 
-		[Test]
-		public virtual void TestHaversinMethod()
-		{
-			AssertEvaluatesTo("haversin(40.7143528,-74.0059731,40.759011,-73.9844722)", 5.284299568309
-				);
-		}
+        [Test]
+        public virtual void TestHaversinMethod()
+        {
+            AssertEvaluatesTo("haversin(40.7143528,-74.0059731,40.759011,-73.9844722)", 5.284299568309
+                );
+        }
 
-		[Test]
-		public virtual void TestLnMethod()
-		{
-			AssertEvaluatesTo("ln(0)", double.NegativeInfinity);
-			AssertEvaluatesTo("ln(" + Math.E + ")", 1);
-			AssertEvaluatesTo("ln(-1)", double.NaN);
-			AssertEvaluatesTo("ln(1)", 0);
-			AssertEvaluatesTo("ln(0.5)", -0.69314718056);
-			AssertEvaluatesTo("ln(12.3456789)", 2.51330611521);
-		}
+        [Test]
+        public virtual void TestLnMethod()
+        {
+            AssertEvaluatesTo("ln(0)", double.NegativeInfinity);
+            AssertEvaluatesTo("ln(" + Math.E + ")", 1);
+            AssertEvaluatesTo("ln(-1)", double.NaN);
+            AssertEvaluatesTo("ln(1)", 0);
+            AssertEvaluatesTo("ln(0.5)", -0.69314718056);
+            AssertEvaluatesTo("ln(12.3456789)", 2.51330611521);
+        }
 
-		[Test]
-		public virtual void TestLog10Method()
-		{
-			AssertEvaluatesTo("log10(0)", double.NegativeInfinity);
-			AssertEvaluatesTo("log10(1)", 0);
-			AssertEvaluatesTo("log10(-1)", double.NaN);
-			AssertEvaluatesTo("log10(0.5)", -0.3010299956639812);
-			AssertEvaluatesTo("log10(12.3456789)", 1.0915149771692705);
-		}
+        [Test]
+        public virtual void TestLog10Method()
+        {
+            AssertEvaluatesTo("log10(0)", double.NegativeInfinity);
+            AssertEvaluatesTo("log10(1)", 0);
+            AssertEvaluatesTo("log10(-1)", double.NaN);
+            AssertEvaluatesTo("log10(0.5)", -0.3010299956639812);
+            AssertEvaluatesTo("log10(12.3456789)", 1.0915149771692705);
+        }
 
-		[Test]
-		public virtual void TestLognMethod()
-		{
-			AssertEvaluatesTo("logn(2, 0)", double.NegativeInfinity);
-			AssertEvaluatesTo("logn(2, 1)", 0);
-			AssertEvaluatesTo("logn(2, -1)", double.NaN);
-			AssertEvaluatesTo("logn(2, 0.5)", -1);
-			AssertEvaluatesTo("logn(2, 12.3456789)", 3.6259342686489378);
-			AssertEvaluatesTo("logn(2.5, 0)", double.NegativeInfinity);
-			AssertEvaluatesTo("logn(2.5, 1)", 0);
-			AssertEvaluatesTo("logn(2.5, -1)", double.NaN);
-			AssertEvaluatesTo("logn(2.5, 0.5)", -0.75647079736603);
-			AssertEvaluatesTo("logn(2.5, 12.3456789)", 2.7429133874016745);
-		}
+        [Test]
+        public virtual void TestLognMethod()
+        {
+            AssertEvaluatesTo("logn(2, 0)", double.NegativeInfinity);
+            AssertEvaluatesTo("logn(2, 1)", 0);
+            AssertEvaluatesTo("logn(2, -1)", double.NaN);
+            AssertEvaluatesTo("logn(2, 0.5)", -1);
+            AssertEvaluatesTo("logn(2, 12.3456789)", 3.6259342686489378);
+            AssertEvaluatesTo("logn(2.5, 0)", double.NegativeInfinity);
+            AssertEvaluatesTo("logn(2.5, 1)", 0);
+            AssertEvaluatesTo("logn(2.5, -1)", double.NaN);
+            AssertEvaluatesTo("logn(2.5, 0.5)", -0.75647079736603);
+            AssertEvaluatesTo("logn(2.5, 12.3456789)", 2.7429133874016745);
+        }
 
-		[Test]
-		public virtual void TestMaxMethod()
-		{
-			AssertEvaluatesTo("max(0, 0)", 0);
-			AssertEvaluatesTo("max(1, 0)", 1);
-			AssertEvaluatesTo("max(0, -1)", 0);
-			AssertEvaluatesTo("max(-1, 0)", 0);
-			AssertEvaluatesTo("max(25, 23)", 25);
-		}
+        [Test]
+        public virtual void TestMaxMethod()
+        {
+            AssertEvaluatesTo("max(0, 0)", 0);
+            AssertEvaluatesTo("max(1, 0)", 1);
+            AssertEvaluatesTo("max(0, -1)", 0);
+            AssertEvaluatesTo("max(-1, 0)", 0);
+            AssertEvaluatesTo("max(25, 23)", 25);
+        }
 
-		[Test]
-		public virtual void TestMinMethod()
-		{
-			AssertEvaluatesTo("min(0, 0)", 0);
-			AssertEvaluatesTo("min(1, 0)", 0);
-			AssertEvaluatesTo("min(0, -1)", -1);
-			AssertEvaluatesTo("min(-1, 0)", -1);
-			AssertEvaluatesTo("min(25, 23)", 23);
-		}
+        [Test]
+        public virtual void TestMinMethod()
+        {
+            AssertEvaluatesTo("min(0, 0)", 0);
+            AssertEvaluatesTo("min(1, 0)", 0);
+            AssertEvaluatesTo("min(0, -1)", -1);
+            AssertEvaluatesTo("min(-1, 0)", -1);
+            AssertEvaluatesTo("min(25, 23)", 23);
+        }
 
-		[Test]
-		public virtual void TestPowMethod()
-		{
-			AssertEvaluatesTo("pow(0, 0)", 1);
-			AssertEvaluatesTo("pow(0.1, 2)", 0.01);
-			AssertEvaluatesTo("pow(0.9, -1)", 1.1111111111111112);
-			AssertEvaluatesTo("pow(2.2, -2.5)", 0.13929749224447147);
-			AssertEvaluatesTo("pow(5, 3)", 125);
-			AssertEvaluatesTo("pow(-0.9, 5)", -0.59049);
-			AssertEvaluatesTo("pow(-1.1, 2)", 1.21);
-		}
+        [Test]
+        public virtual void TestPowMethod()
+        {
+            AssertEvaluatesTo("pow(0, 0)", 1);
+            AssertEvaluatesTo("pow(0.1, 2)", 0.01);
+            AssertEvaluatesTo("pow(0.9, -1)", 1.1111111111111112);
+            AssertEvaluatesTo("pow(2.2, -2.5)", 0.13929749224447147);
+            AssertEvaluatesTo("pow(5, 3)", 125);
+            AssertEvaluatesTo("pow(-0.9, 5)", -0.59049);
+            AssertEvaluatesTo("pow(-1.1, 2)", 1.21);
+        }
 
-		[Test]
-		public virtual void TestSinMethod()
-		{
-			AssertEvaluatesTo("sin(0)", 0);
-			AssertEvaluatesTo("sin(" + Math.PI / 2 + ")", 1);
-			AssertEvaluatesTo("sin(" + -Math.PI / 2 + ")", -1);
-			AssertEvaluatesTo("sin(" + Math.PI / 4 + ")", 0.7071068);
-			AssertEvaluatesTo("sin(" + -Math.PI / 4 + ")", -0.7071068);
-			AssertEvaluatesTo("sin(" + Math.PI * 2 / 3 + ")", 0.8660254);
-			AssertEvaluatesTo("sin(" + -Math.PI * 2 / 3 + ")", -0.8660254);
-			AssertEvaluatesTo("sin(" + Math.PI / 6 + ")", 0.5);
-			AssertEvaluatesTo("sin(" + -Math.PI / 6 + ")", -0.5);
-		}
+        [Test]
+        public virtual void TestSinMethod()
+        {
+            AssertEvaluatesTo("sin(0)", 0);
+            AssertEvaluatesTo("sin(" + Math.PI / 2 + ")", 1);
+            AssertEvaluatesTo("sin(" + -Math.PI / 2 + ")", -1);
+            AssertEvaluatesTo("sin(" + Math.PI / 4 + ")", 0.7071068);
+            AssertEvaluatesTo("sin(" + -Math.PI / 4 + ")", -0.7071068);
+            AssertEvaluatesTo("sin(" + Math.PI * 2 / 3 + ")", 0.8660254);
+            AssertEvaluatesTo("sin(" + -Math.PI * 2 / 3 + ")", -0.8660254);
+            AssertEvaluatesTo("sin(" + Math.PI / 6 + ")", 0.5);
+            AssertEvaluatesTo("sin(" + -Math.PI / 6 + ")", -0.5);
+        }
 
-		[Test]
-		public virtual void TestSinhMethod()
-		{
-			AssertEvaluatesTo("sinh(0)", 0);
-			AssertEvaluatesTo("sinh(-1)", -1.1752011936438014);
-			AssertEvaluatesTo("sinh(1)", 1.1752011936438014);
-			AssertEvaluatesTo("sinh(-0.5)", -0.52109530549);
-			AssertEvaluatesTo("sinh(0.5)", 0.52109530549);
-			AssertEvaluatesTo("sinh(-12.3456789)", -114982.09728236674);
-			AssertEvaluatesTo("sinh(12.3456789)", 114982.09728236674);
-		}
+        [Test]
+        public virtual void TestSinhMethod()
+        {
+            AssertEvaluatesTo("sinh(0)", 0);
+            AssertEvaluatesTo("sinh(-1)", -1.1752011936438014);
+            AssertEvaluatesTo("sinh(1)", 1.1752011936438014);
+            AssertEvaluatesTo("sinh(-0.5)", -0.52109530549);
+            AssertEvaluatesTo("sinh(0.5)", 0.52109530549);
+            AssertEvaluatesTo("sinh(-12.3456789)", -114982.09728236674);
+            AssertEvaluatesTo("sinh(12.3456789)", 114982.09728236674);
+        }
 
-		[Test]
-		public virtual void TestSqrtMethod()
-		{
-			AssertEvaluatesTo("sqrt(0)", 0);
-			AssertEvaluatesTo("sqrt(-1)", double.NaN);
-			AssertEvaluatesTo("sqrt(0.49)", 0.7);
-			AssertEvaluatesTo("sqrt(49)", 7);
-		}
+        [Test]
+        public virtual void TestSqrtMethod()
+        {
+            AssertEvaluatesTo("sqrt(0)", 0);
+            AssertEvaluatesTo("sqrt(-1)", double.NaN);
+            AssertEvaluatesTo("sqrt(0.49)", 0.7);
+            AssertEvaluatesTo("sqrt(49)", 7);
+        }
 
-		[Test]
-		public virtual void TestTanMethod()
-		{
-			AssertEvaluatesTo("tan(0)", 0);
-			AssertEvaluatesTo("tan(-1)", -1.55740772465);
-			AssertEvaluatesTo("tan(1)", 1.55740772465);
-			AssertEvaluatesTo("tan(-0.5)", -0.54630248984);
-			AssertEvaluatesTo("tan(0.5)", 0.54630248984);
-			AssertEvaluatesTo("tan(-1.3)", -3.60210244797);
-			AssertEvaluatesTo("tan(1.3)", 3.60210244797);
-		}
+        [Test]
+        public virtual void TestTanMethod()
+        {
+            AssertEvaluatesTo("tan(0)", 0);
+            AssertEvaluatesTo("tan(-1)", -1.55740772465);
+            AssertEvaluatesTo("tan(1)", 1.55740772465);
+            AssertEvaluatesTo("tan(-0.5)", -0.54630248984);
+            AssertEvaluatesTo("tan(0.5)", 0.54630248984);
+            AssertEvaluatesTo("tan(-1.3)", -3.60210244797);
+            AssertEvaluatesTo("tan(1.3)", 3.60210244797);
+        }
 
-		[Test]
-		public virtual void TestTanhMethod()
-		{
-			AssertEvaluatesTo("tanh(0)", 0);
-			AssertEvaluatesTo("tanh(-1)", -0.76159415595);
-			AssertEvaluatesTo("tanh(1)", 0.76159415595);
-			AssertEvaluatesTo("tanh(-0.5)", -0.46211715726);
-			AssertEvaluatesTo("tanh(0.5)", 0.46211715726);
-			AssertEvaluatesTo("tanh(-12.3456789)", -0.99999999996);
-			AssertEvaluatesTo("tanh(12.3456789)", 0.99999999996);
-		}
-	}
+        [Test]
+        public virtual void TestTanhMethod()
+        {
+            AssertEvaluatesTo("tanh(0)", 0);
+            AssertEvaluatesTo("tanh(-1)", -0.76159415595);
+            AssertEvaluatesTo("tanh(1)", 0.76159415595);
+            AssertEvaluatesTo("tanh(-0.5)", -0.46211715726);
+            AssertEvaluatesTo("tanh(0.5)", 0.46211715726);
+            AssertEvaluatesTo("tanh(-12.3456789)", -0.99999999996);
+            AssertEvaluatesTo("tanh(12.3456789)", 0.99999999996);
+        }
+    }
 }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptOperations.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptOperations.cs b/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptOperations.cs
index 71f8465..0a3b52c 100644
--- a/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptOperations.cs
+++ b/src/Lucene.Net.Tests.Expressions/JS/TestJavascriptOperations.cs
@@ -1,10 +1,9 @@
-using Lucene.Net.Expressions;
-using Lucene.Net.Expressions.JS;
+using Lucene.Net.Util;
 using NUnit.Framework;
 
-namespace Lucene.Net.Tests.Expressions.JS
+namespace Lucene.Net.Expressions.JS
 {
-	public class TestJavascriptOperations : Util.LuceneTestCase
+    public class TestJavascriptOperations : LuceneTestCase
 	{
 		
 		private void AssertEvaluatesTo(string expression, long expected)

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
index 677289b..8c67c3e 100644
--- a/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
+++ b/src/Lucene.Net.Tests.Expressions/Lucene.Net.Tests.Expressions.csproj
@@ -7,7 +7,7 @@
     <ProjectGuid>{F4873D95-4300-4E83-AFFA-EF796495D0F0}</ProjectGuid>
     <OutputType>Library</OutputType>
     <AppDesignerFolder>Properties</AppDesignerFolder>
-    <RootNamespace>Lucene.Net.Tests.Expressions</RootNamespace>
+    <RootNamespace>Lucene.Net.Expressions</RootNamespace>
     <AssemblyName>Lucene.Net.Tests.Expressions</AssemblyName>
     <TargetFrameworkVersion>v4.5.1</TargetFrameworkVersion>
     <FileAlignment>512</FileAlignment>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs b/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs
index 1d0c034..d7f1358 100644
--- a/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestApiConsistency.cs
@@ -3,7 +3,7 @@ using Lucene.Net.Util;
 using NUnit.Framework;
 using System;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
     /// <summary>
     /// LUCENENET specific tests for ensuring API conventions are followed

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs b/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
index bbe4260..f30f9b4 100644
--- a/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestDemoExpressions.cs
@@ -1,19 +1,18 @@
-using System;
-using System.Text;
 using Lucene.Net.Documents;
-using Lucene.Net.Expressions;
 using Lucene.Net.Expressions.JS;
 using Lucene.Net.Index;
 using Lucene.Net.Search;
 using Lucene.Net.Store;
+using Lucene.Net.Util;
 using NUnit.Framework;
-using Expression = System.Linq.Expressions.Expression;
+using System;
+using System.Text;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
     /// <summary>simple demo of using expressions</summary>
     [SuppressCodecs("Lucene3x")]
-    public class TestDemoExpressions : Util.LuceneTestCase
+    public class TestDemoExpressions : LuceneTestCase
 	{
 		internal IndexSearcher searcher;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
index ae8943a..4b37ccb 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionRescorer.cs
@@ -1,15 +1,15 @@
 using Lucene.Net.Documents;
-using Lucene.Net.Expressions;
 using Lucene.Net.Expressions.JS;
 using Lucene.Net.Index;
 using Lucene.Net.Search;
 using Lucene.Net.Store;
+using Lucene.Net.Util;
 using NUnit.Framework;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
     [SuppressCodecs("Lucene3x")]
-	public class TestExpressionRescorer : Lucene.Net.Util.LuceneTestCase
+	public class TestExpressionRescorer : LuceneTestCase
 	{
 		internal IndexSearcher searcher;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestExpressionSortField.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionSortField.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionSortField.cs
index 985e843..23c4608 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionSortField.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionSortField.cs
@@ -1,11 +1,11 @@
-using Lucene.Net.Expressions;
 using Lucene.Net.Expressions.JS;
 using Lucene.Net.Search;
+using Lucene.Net.Util;
 using NUnit.Framework;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
-	public class TestExpressionSortField : Util.LuceneTestCase
+    public class TestExpressionSortField : LuceneTestCase
 	{
 		[Test]
 		public virtual void TestToString()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
index 563db40..1610312 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionSorts.cs
@@ -1,5 +1,4 @@
 using Lucene.Net.Documents;
-using Lucene.Net.Expressions;
 using Lucene.Net.Expressions.JS;
 using Lucene.Net.Index;
 using Lucene.Net.Randomized.Generators;
@@ -9,7 +8,7 @@ using Lucene.Net.Support;
 using Lucene.Net.Util;
 using NUnit.Framework;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
     /// <summary>
     /// Tests some basic expressions against different queries,
@@ -20,7 +19,7 @@ namespace Lucene.Net.Tests.Expressions
     /// and fieldcache/docvalues fields against an equivalent sort.
     /// </remarks>
     [SuppressCodecs("Lucene3x")]
-    public class TestExpressionSorts : Util.LuceneTestCase
+    public class TestExpressionSorts : LuceneTestCase
     {
         private Directory dir;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestExpressionValidation.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionValidation.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionValidation.cs
index 9912128..8b117bd 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionValidation.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionValidation.cs
@@ -1,13 +1,13 @@
-using System;
-using Lucene.Net.Expressions;
 using Lucene.Net.Expressions.JS;
 using Lucene.Net.Search;
+using Lucene.Net.Util;
 using NUnit.Framework;
+using System;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
-	/// <summary>Tests validation of bindings</summary>
-	public class TestExpressionValidation : Util.LuceneTestCase
+    /// <summary>Tests validation of bindings</summary>
+    public class TestExpressionValidation : LuceneTestCase
 	{
 		[Test]
 		public virtual void TestValidExternals()

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/51e3957c/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs b/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
index 5ccd24c..3c8b64d 100644
--- a/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
+++ b/src/Lucene.Net.Tests.Expressions/TestExpressionValueSource.cs
@@ -1,18 +1,18 @@
-using System.Collections.Generic;
 using Lucene.Net.Analysis;
 using Lucene.Net.Documents;
-using Lucene.Net.Expressions;
 using Lucene.Net.Expressions.JS;
 using Lucene.Net.Index;
 using Lucene.Net.Queries.Function;
 using Lucene.Net.Search;
 using Lucene.Net.Store;
+using Lucene.Net.Util;
 using NUnit.Framework;
+using System.Collections.Generic;
 
-namespace Lucene.Net.Tests.Expressions
+namespace Lucene.Net.Expressions
 {
     [SuppressCodecs("Lucene3x")]
-	public class TestExpressionValueSource : Util.LuceneTestCase
+	public class TestExpressionValueSource : LuceneTestCase
 	{
 		internal DirectoryReader reader;
 


Mime
View raw message