From 025fa2a744189e844ddd84afd57bdc2c119a57a7 Mon Sep 17 00:00:00 2001 From: Annie Mao <anniem4@cs.washington.edu> Date: Mon, 21 Jan 2019 23:24:27 -0800 Subject: [PATCH] Fixed object equality in NGramToNextChoicesMap Tests --- src/tests/gitlab/ckpt1/NGramToNextChoicesMapTests.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/tests/gitlab/ckpt1/NGramToNextChoicesMapTests.java b/src/tests/gitlab/ckpt1/NGramToNextChoicesMapTests.java index 24b65af..cc96579 100644 --- a/src/tests/gitlab/ckpt1/NGramToNextChoicesMapTests.java +++ b/src/tests/gitlab/ckpt1/NGramToNextChoicesMapTests.java @@ -95,7 +95,7 @@ public class NGramToNextChoicesMapTests extends TestsUtility { if (items.length != answer.length) return 0; String[] itemsWithoutCounts = new String[items.length]; for (int j = 0; j < answer.length; j++) { - if (items[j].value != 1) return 0; + if (!items[j].value.equals(1)) return 0; itemsWithoutCounts[j] = items[j].key; } Arrays.sort(itemsWithoutCounts); @@ -200,7 +200,7 @@ public class NGramToNextChoicesMapTests extends TestsUtility { return 0; } // checks if correct count for given word after - if (expected[j].value != results[j].value) { + if (!expected[j].value.equals(results[j].value)) { return 0; } } -- GitLab