Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id C3718200C4A for ; Sun, 2 Apr 2017 09:06:03 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id C2230160BA6; Sun, 2 Apr 2017 07:06:03 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 1F8C8160B77 for ; Sun, 2 Apr 2017 09:06:02 +0200 (CEST) Received: (qmail 43155 invoked by uid 500); 2 Apr 2017 07:06:02 -0000 Mailing-List: contact commits-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: lucene-net-dev@lucenenet.apache.org Delivered-To: mailing list commits@lucenenet.apache.org Received: (qmail 43063 invoked by uid 99); 2 Apr 2017 07:06:01 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Apr 2017 07:06:01 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 82BD8E00AF; Sun, 2 Apr 2017 07:06:01 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: nightowl888@apache.org To: commits@lucenenet.apache.org Date: Sun, 02 Apr 2017 07:06:03 -0000 Message-Id: <10b8740c1d5b4cd99a77e62b0117641c@git.apache.org> In-Reply-To: <8cb7882a9a0844b1a19a5b0cff657b44@git.apache.org> References: <8cb7882a9a0844b1a19a5b0cff657b44@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [03/20] lucenenet git commit: Lucene.Net.Tests.Util.Automaton.TestMinimize: Updated debug notes archived-at: Sun, 02 Apr 2017 07:06:03 -0000 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 Authored: Sun Apr 2 09:16:26 2017 +0700 Committer: Shad Storhaug 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, 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