lucenenet-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhershko <...@git.apache.org>
Subject [GitHub] lucenenet pull request #185: Ported Core.Util.Fst tests + Core.Util.Packed.T...
Date Sun, 11 Sep 2016 22:03:36 GMT
Github user synhershko commented on a diff in the pull request:

    https://github.com/apache/lucenenet/pull/185#discussion_r78303386
  
    --- Diff: src/Lucene.Net.TestFramework/Util/fst/FSTTester.cs ---
    @@ -395,6 +407,24 @@ internal virtual FST<T> DoTest(int prune1, int prune2, bool
allowRandomSuffixSha
     
             protected internal virtual bool OutputsEqual(T a, T b)
             {
    +            // LUCENENET: In .NET, lists do not automatically test to ensure
    +            // their values are equal, so we need to do that manually.
    +            // Note that we are testing the values without regard to whether
    +            // the enumerable type is nullable.
    +            if (a is IEnumerable && b is IEnumerable)
    +            {
    +                var iter = (b as IEnumerable).GetEnumerator();
    +                foreach (object value in a as IEnumerable)
    +                {
    +                    iter.MoveNext();
    +                    if (!object.Equals(value, iter.Current))
    +                    {
    +                        return false;
    +                    }
    +                }
    +                return true;
    +            }
    --- End diff --
    
    `AssertRootArcs()`. Also a similar fix duped in NodeHash. Just nit-picking here, but worth
noting.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message