Skip to content

Commit 47a8802

Browse files
committed
updated comments
1 parent 3852fcd commit 47a8802

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

app/test/processing/app/UpdateCheckTest.java

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ private String createTempFile(String content) throws IOException {
2424
return file.toUri().toString();
2525
}
2626

27-
// --- Happy path ---
2827

28+
// tests to show that the method returns what it should
2929
@Test
3030
void readInt_simpleInteger_returnsCorrectValue() throws IOException {
3131
String url = createTempFile("42\n");
@@ -68,8 +68,7 @@ void readInt_integerWithMultipleLines_readsOnlyFirstLine() throws IOException {
6868
assertEquals(5, UpdateCheck.readInt(url));
6969
}
7070

71-
// --- Error cases ---
72-
71+
// checks for if errors are correctly reported
7372
@Test
7473
void readInt_nonNumericContent_throwsNumberFormatException() throws IOException {
7574
String url = createTempFile("not-a-number\n");
@@ -113,8 +112,7 @@ void readInt_nonExistentFile_throwsIOException() {
113112
assertThrows(IOException.class, () -> UpdateCheck.readInt(nonExistent));
114113
}
115114

116-
// --- Stream is closed after use ---
117-
115+
// checks for if streams are closed
118116
@Test
119117
void readInt_streamIsClosedAfterSuccessfulRead() throws IOException {
120118
// Spy on the InputStream to verify close() is called

0 commit comments

Comments
 (0)