lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [39/50] [abbrv] lucenenet git commit: Lucene.Net.Tests.Queries: Suppressed unused variable warnings about exception variables and obsolete warnings
Date Wed, 25 Jan 2017 03:44:23 GMT
Lucene.Net.Tests.Queries: Suppressed unused variable warnings about exception variables and
obsolete warnings


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

Branch: refs/heads/api-work
Commit: aa9e48ae547f0c3e68198a020269a24f16f91dc2
Parents: 9aa8d66
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Wed Jan 25 06:38:41 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Wed Jan 25 09:34:48 2017 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs       | 6 ++++++
 src/Lucene.Net.Tests.Queries/Function/FunctionTestSetup.cs | 2 ++
 src/Lucene.Net.Tests.Queries/Function/TestValueSources.cs  | 4 ++++
 src/Lucene.Net.Tests.Queries/TermFilterTest.cs             | 4 ++++
 4 files changed, 16 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aa9e48ae/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs b/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs
index 7f529d8..aa0b481 100644
--- a/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs
+++ b/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs
@@ -142,7 +142,9 @@ namespace Lucene.Net.Tests.Queries
                 query.Add(null);
                 Fail(@"null values are not supported");
             }
+#pragma warning disable 168
             catch (ArgumentException ex)
+#pragma warning restore 168
             {
             }
         }
@@ -285,7 +287,9 @@ namespace Lucene.Net.Tests.Queries
                 new CommonTermsQuery(Occur.MUST_NOT, RandomOccur(random), Random().NextFloat());
                 Fail(@"MUST_NOT is not supproted");
             }
+#pragma warning disable 168
             catch (ArgumentException ex)
+#pragma warning restore 168
             {
             }
 
@@ -294,7 +298,9 @@ namespace Lucene.Net.Tests.Queries
                 new CommonTermsQuery(RandomOccur(random), Occur.MUST_NOT, Random().NextFloat());
                 Fail(@"MUST_NOT is not supproted");
             }
+#pragma warning disable 168
             catch (ArgumentException ex)
+#pragma warning restore 168
             {
             }
         }

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aa9e48ae/src/Lucene.Net.Tests.Queries/Function/FunctionTestSetup.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Function/FunctionTestSetup.cs b/src/Lucene.Net.Tests.Queries/Function/FunctionTestSetup.cs
index b06d52c..2fd778a 100644
--- a/src/Lucene.Net.Tests.Queries/Function/FunctionTestSetup.cs
+++ b/src/Lucene.Net.Tests.Queries/Function/FunctionTestSetup.cs
@@ -29,8 +29,10 @@ namespace Lucene.Net.Tests.Queries.Function
         protected internal const string INT_FIELD = "iii";
         protected internal const string FLOAT_FIELD = "fff";
 
+#pragma warning disable 612, 618
         protected internal ValueSource BYTE_VALUESOURCE = new ByteFieldSource(INT_FIELD);
         protected internal ValueSource SHORT_VALUESOURCE = new ShortFieldSource(INT_FIELD);
+#pragma warning restore 612, 618
         protected internal ValueSource INT_VALUESOURCE = new IntFieldSource(INT_FIELD);
         protected internal ValueSource INT_AS_FLOAT_VALUESOURCE = new FloatFieldSource(INT_FIELD);
         protected internal ValueSource FLOAT_VALUESOURCE = new FloatFieldSource(FLOAT_FIELD);

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aa9e48ae/src/Lucene.Net.Tests.Queries/Function/TestValueSources.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/Function/TestValueSources.cs b/src/Lucene.Net.Tests.Queries/Function/TestValueSources.cs
index 8b91a40..35ce6a0 100644
--- a/src/Lucene.Net.Tests.Queries/Function/TestValueSources.cs
+++ b/src/Lucene.Net.Tests.Queries/Function/TestValueSources.cs
@@ -94,7 +94,9 @@ namespace Lucene.Net.Tests.Queries.Function
         [Test]
         public void TestByte()
         {
+#pragma warning disable 612, 618
             AssertHits(new FunctionQuery(new ByteFieldSource("byte")), new[] { 5f, 12f });
+#pragma warning restore 612, 618
         }
 
         [Test]
@@ -262,7 +264,9 @@ namespace Lucene.Net.Tests.Queries.Function
         [Test]
         public void TestShort()
         {
+#pragma warning disable 612, 618
             AssertHits(new FunctionQuery(new ShortFieldSource("short")), new[] { 945f, 123f
});
+#pragma warning restore 612, 618
         }
 
         [Test]

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/aa9e48ae/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Queries/TermFilterTest.cs b/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
index e273518..9169e46 100644
--- a/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
+++ b/src/Lucene.Net.Tests.Queries/TermFilterTest.cs
@@ -144,7 +144,9 @@ namespace Lucene.Net.Tests.Queries
                 new TermFilter(null);
                 Fail(@"must fail - no term!");
             }
+#pragma warning disable 168
             catch (ArgumentException e)
+#pragma warning restore 168
             {
             }
 
@@ -153,7 +155,9 @@ namespace Lucene.Net.Tests.Queries
                 new TermFilter(new Term(null));
                 Fail(@"must fail - no field!");
             }
+#pragma warning disable 168
             catch (ArgumentException e)
+#pragma warning restore 168
             {
             }
         }


Mime
View raw message