BUG: Lucene.Net.TestFramework.JavaCompatibility.SystemTypesHelpers: Fixed implementation of containsAll to correctly check whether x is a superset of y by using the ISet<T>.IsSupersetOf() method. The incorrect implementation was causing Lucene.Net.Tests.Highlighter.PostingsHighlight.TestPostingsHighlighterRanking.TestRanking() to fail.
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/cc71ddb3 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/cc71ddb3 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/cc71ddb3 Branch: refs/heads/api-work Commit: cc71ddb3187b76a1cda1ff60c8774452e4d15e80 Parents: e2042a4 Author: Shad Storhaug <[email protected]> Authored: Wed Mar 8 23:54:45 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Mar 9 01:11:07 2017 +0700 ---------------------------------------------------------------------- .../JavaCompatibility/SystemTypesHelpers.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cc71ddb3/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs b/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs index aecca7a..149b393 100644 --- a/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs +++ b/src/Lucene.Net.TestFramework/JavaCompatibility/SystemTypesHelpers.cs @@ -193,7 +193,7 @@ namespace Lucene.Net public static bool containsAll<T>(this ISet<T> s, IEnumerable<T> list) { - return list.Any(s.Contains); + return s.IsSupersetOf(list); } public static bool remove<T>(this ISet<T> s, T item)
