Skip to content

Commit 4bdc583

Browse files
update 227
1 parent a1b637a commit 4bdc583

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

Diff for: src/main/java/com/fishercoder/solutions/_227.java

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ public int calculate(String s) {
2929
stack.addLast(stack.pollLast() * num);
3030
}
3131
sign = s.charAt(i);
32+
//reset num for the next integer
3233
num = 0;
3334
}
3435
}

Diff for: src/test/java/com/fishercoder/_227Test.java

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
package com.fishercoder;
22

33
import com.fishercoder.solutions._227;
4-
import org.junit.BeforeClass;
5-
import org.junit.Test;
4+
import org.junit.jupiter.api.BeforeEach;
5+
import org.junit.jupiter.api.Test;
66

7-
import static org.junit.Assert.assertEquals;
7+
import static org.junit.jupiter.api.Assertions.assertEquals;
88

99
public class _227Test {
1010
private static _227.Solution1 solution1;
1111

12-
@BeforeClass
13-
public static void setup() {
12+
@BeforeEach
13+
public void setup() {
1414
solution1 = new _227.Solution1();
1515
}
1616

0 commit comments

Comments
 (0)