From e99b9f5b4c1e98ddbdb3f653b270139b70cee136 Mon Sep 17 00:00:00 2001 From: Jonathan Calver Date: Fri, 13 Sep 2024 00:36:03 -0400 Subject: [PATCH] added comment about how to set up the test to run in IntelliJ --- src/DataTypes.java | 2 +- test/DataTypesTest.java | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/DataTypes.java b/src/DataTypes.java index 4f807c1f..eebcb595 100644 --- a/src/DataTypes.java +++ b/src/DataTypes.java @@ -4,7 +4,7 @@ public class DataTypes { // TODO TASK 1: fix this code so that it passes the test in DataTypesTest.java public static long sum(List numbers) { - int s = 0; + long s = 0; // below is a "foreach" loop which iterates through numbers for (int x : numbers) { s += x; diff --git a/test/DataTypesTest.java b/test/DataTypesTest.java index de9d8099..42b9ef96 100644 --- a/test/DataTypesTest.java +++ b/test/DataTypesTest.java @@ -2,7 +2,8 @@ import java.util.ArrayList; import java.util.List; - +// place your cursor over junit below and +// click "Add 'Junit4' to classpath" then press OK to be able to run this test. import static org.junit.Assert.assertEquals; public class DataTypesTest {