You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/01/26 02:50:06 UTC
[1/2] lucenenet git commit: Setup API consistency tests on
Analysis.Common
Repository: lucenenet
Updated Branches:
refs/heads/api-work 2315d0d41 -> 1ebaad01e
Setup API consistency tests on Analysis.Common
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/933ae788
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/933ae788
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/933ae788
Branch: refs/heads/api-work
Commit: 933ae7885d11d68ae36f7e13231f34a1bfb4c3ad
Parents: 2315d0d
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Jan 26 09:42:14 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Jan 26 09:43:52 2017 +0700
----------------------------------------------------------------------
.../Lucene.Net.Tests.Analysis.Common.csproj | 1 +
.../TestApiConsistency.cs | 104 +++++++++++++++++++
2 files changed, 105 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/933ae788/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
index 2d0d85b..bce782a 100644
--- a/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
+++ b/src/Lucene.Net.Tests.Analysis.Common/Lucene.Net.Tests.Analysis.Common.csproj
@@ -322,6 +322,7 @@
<Compile Include="Collation\TestCollationKeyFilter.cs" />
<Compile Include="Collation\TestCollationKeyFilterFactory.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
+ <Compile Include="TestApiConsistency.cs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\Lucene.Net.Analysis.Common\Lucene.Net.Analysis.Common.csproj">
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/933ae788/src/Lucene.Net.Tests.Analysis.Common/TestApiConsistency.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/TestApiConsistency.cs b/src/Lucene.Net.Tests.Analysis.Common/TestApiConsistency.cs
new file mode 100644
index 0000000..6411007
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/TestApiConsistency.cs
@@ -0,0 +1,104 @@
+\ufeffusing Lucene.Net.Attributes;
+using Lucene.Net.Util;
+using NUnit.Framework;
+using System;
+
+namespace Lucene.Net.Analysis
+{
+ /// <summary>
+ /// LUCENENET specific tests for ensuring API conventions are followed
+ /// </summary>
+ public class TestApiConsistency : ApiScanTestBase
+ {
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestProtectedFieldNames(Type typeFromTargetAssembly)
+ {
+ base.TestProtectedFieldNames(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestPrivateFieldNames(Type typeFromTargetAssembly)
+ {
+ base.TestPrivateFieldNames(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestPublicFields(Type typeFromTargetAssembly)
+ {
+ base.TestPublicFields(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestMethodParameterNames(Type typeFromTargetAssembly)
+ {
+ base.TestMethodParameterNames(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestInterfaceNames(Type typeFromTargetAssembly)
+ {
+ base.TestInterfaceNames(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestClassNames(Type typeFromTargetAssembly)
+ {
+ base.TestClassNames(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForPropertiesWithNoGetter(Type typeFromTargetAssembly)
+ {
+ base.TestForPropertiesWithNoGetter(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForPropertiesThatReturnArray(Type typeFromTargetAssembly)
+ {
+ base.TestForPropertiesThatReturnArray(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForMethodsThatReturnWritableArray(Type typeFromTargetAssembly)
+ {
+ base.TestForMethodsThatReturnWritableArray(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForPublicMembersContainingComparer(Type typeFromTargetAssembly)
+ {
+ base.TestForPublicMembersContainingComparer(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForPublicMembersNamedSize(Type typeFromTargetAssembly)
+ {
+ base.TestForPublicMembersNamedSize(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForPublicMembersContainingNonNetNumeric(Type typeFromTargetAssembly)
+ {
+ base.TestForPublicMembersContainingNonNetNumeric(typeFromTargetAssembly);
+ }
+
+ [Test, LuceneNetSpecific]
+ [TestCase(typeof(Lucene.Net.Analysis.Standard.ClassicAnalyzer))]
+ public override void TestForPublicMembersWithNullableEnum(Type typeFromTargetAssembly)
+ {
+ base.TestForPublicMembersWithNullableEnum(typeFromTargetAssembly);
+ }
+ }
+}
[2/2] lucenenet git commit:
Lucene.Net.Analysis.Common.Analysis.Hunspell.ISO8859_14Decoder: Added
ExceptionToClassNameConvention attribute
Posted by ni...@apache.org.
Lucene.Net.Analysis.Common.Analysis.Hunspell.ISO8859_14Decoder: Added ExceptionToClassNameConvention attribute
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/1ebaad01
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/1ebaad01
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/1ebaad01
Branch: refs/heads/api-work
Commit: 1ebaad01e1d75fc5c5196f14d525ba805b6c5d05
Parents: 933ae78
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Thu Jan 26 09:46:48 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Thu Jan 26 09:46:48 2017 +0700
----------------------------------------------------------------------
.../Analysis/Hunspell/ISO8859_14Decoder.cs | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/1ebaad01/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/ISO8859_14Decoder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/ISO8859_14Decoder.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/ISO8859_14Decoder.cs
index 7558efd..c281600 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/ISO8859_14Decoder.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/ISO8859_14Decoder.cs
@@ -1,4 +1,5 @@
-\ufeffusing System;
+\ufeffusing Lucene.Net.Support;
+using System;
using System.Text;
namespace Lucene.Net.Analysis.Hunspell
@@ -23,6 +24,7 @@ namespace Lucene.Net.Analysis.Hunspell
// LUCENENET NOTE: This class was refactored from its Java counterpart.
// many hunspell dictionaries use this encoding, yet java/.NET does not have it?!?!
+ [ExceptionToClassNameConvention]
internal sealed class ISO8859_14Encoding : Encoding
{
private static readonly Decoder decoder = new ISO8859_14Decoder();
@@ -82,6 +84,7 @@ namespace Lucene.Net.Analysis.Hunspell
#endregion
}
+ [ExceptionToClassNameConvention]
internal sealed class ISO8859_14Decoder : Decoder
{
internal static readonly char[] TABLE = new char[]