lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [03/20] lucenenet git commit: Lucene.Net.Tests.Util.Automaton.TestMinimize: Updated debug notes
Date Sun, 02 Apr 2017 07:06:03 GMT
Lucene.Net.Tests.Util.Automaton.TestMinimize: Updated debug notes


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

Branch: refs/heads/api-work
Commit: 4e54801645644f532997c37f7914688b402f8d21
Parents: 3e8d52b
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sun Apr 2 09:16:26 2017 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Sun Apr 2 09:16:26 2017 +0700

----------------------------------------------------------------------
 .../Util/Automaton/TestMinimize.cs              | 37 ++------------------
 1 file changed, 3 insertions(+), 34 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4e548016/src/Lucene.Net.Tests/Util/Automaton/TestMinimize.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/Util/Automaton/TestMinimize.cs b/src/Lucene.Net.Tests/Util/Automaton/TestMinimize.cs
index b58eb06..1328225 100644
--- a/src/Lucene.Net.Tests/Util/Automaton/TestMinimize.cs
+++ b/src/Lucene.Net.Tests/Util/Automaton/TestMinimize.cs
@@ -63,43 +63,12 @@ namespace Lucene.Net.Util.Automaton
 
         // LUCENENET TODO:
         //
-        // DEBUG NOTE: 
-        //
-        // Worked with the below test quite a bit to get it to match Lucene,
-        // but no luck so far. However, I was able to determine that
-        // 
-        //    AutomatonTestUtil.MinimizeSimple(a);
-        //    Automaton b = (Automaton)a.Clone();
-        //    AutomatonTestUtil.MinimizeSimple(b);
-        //
-        // works and
-        //
-        //    MinimizationOperations.Minimize(a);
-        //    Automaton b = (Automaton)a.Clone();
-        //    MinimizationOperations.Minimize(b);
-        //
-        // works. So, it looks like the Clone() method is working.
-        // The only issue seems to be that the AutomatonTestUtil.MinimizeSimple()
-        // operation is somehow different than the MinimizationOperations.Minimize()
-        // operation. No more than one of them can be correct (but don't know which one,
if either).
-        //
-        // I tried using the a.ToString() to compare what is happening against Java,
-        // but the results are coming back in a slightly different order. It is a strange
implementation
-        // because SpecialOperations.Reverse() is called in AutomatonTestUtil.MinimizeSimple()
-        // but the results are stored in a HashSet<T>, which by definition is not ordered.
-        // So, it is not clear whether order is important or, if so, that it somehow depends

-        // on Java's HashSet implementation to work. It also isn't very clear what 
-        // Automaton is supposed to do.
-        //
-        // I went over the AutomatonTestUtil line-by-line and although there were some things
-        // that needed correcting, the result is still the same.
+        // The initialstate after MinimizeSimple is always 0
+        // in Lucene.NET. However, it doesn't seem to be
+        // causing any issues with other tests failing.
 
         // HERE IS THE RESULT OF THE FOLLOWING TEST IN JAVA
 
-        // One thing of note is that in .NET, the initial state
-        // is always coming back as 0 but in Java it is > 0 after 
-        // the Minimize operation.
-
         //Before MinimizeSimple: initial state: 0
         //state 0 [accept]:
         //  S -> 1


Mime
View raw message