Skip to content

Commit 878868c

Browse files
committed
chore: Remove unused test files and scanner module
1 parent 325220f commit 878868c

File tree

7 files changed

+14
-186
lines changed

7 files changed

+14
-186
lines changed

β€Žinternal/assertions/stderr_assertion.goβ€Ž

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,26 +27,34 @@ func (a StderrAssertion) Run(result executable.ExecutableResult, logger *logger.
2727
logAllSuccessLogs(successLogs, logger)
2828

2929
if skippedLines > 0 {
30-
logger.Errorf("Skipped %d lines that didn't start with [line N]", skippedLines)
30+
logger.Plainf("[stderr] Skipped %d lines that didn't start with [line N]", skippedLines)
3131
}
3232

33-
return fmt.Errorf("Expected line #%d on stderr to be %q, but didn't find line", i+1, expectedLine)
33+
return fmt.Errorf(`
34+
[stderr] Missing line #%d from stderr: %q
35+
[stderr] Perhaps it's printed to stdout? It should be printed to stderr.
36+
`, i+1, expectedLine)
3437
}
3538
actualValue := stderr[i]
3639

3740
if actualValue != expectedLine {
3841
logAllSuccessLogs(successLogs, logger)
39-
logger.Errorf("𐄂 %s", actualValue)
40-
return fmt.Errorf("Expected line #%d on stderr to be %q, got %q", i+1, expectedLine, actualValue)
42+
43+
return fmt.Errorf(`
44+
[stderr] Mismatch on line #%d of stderr:
45+
[stderr] Expected: %q
46+
[stderr] Actual : %q
47+
`, i+1, expectedLine, actualValue)
4148
} else {
4249
successLogs = append(successLogs, fmt.Sprintf("βœ“ %s", actualValue))
4350
}
4451
}
4552

4653
if len(stderr) > len(a.ExpectedLines) {
4754
logAllSuccessLogs(successLogs, logger)
48-
logger.Errorf("! %s", stderr[len(a.ExpectedLines)])
49-
return fmt.Errorf("Expected last stderr line to be %q, but found extra line: %q", a.ExpectedLines[len(a.ExpectedLines)-1], stderr[len(a.ExpectedLines)])
55+
return fmt.Errorf(`
56+
𐄂 [stderr] Extra line in stderr: %q
57+
`, stderr[len(a.ExpectedLines)])
5058
}
5159

5260
// If all lines match, we don't want to print all the lines again

β€Žinternal/test_helpers/fixtures/fail_scanning_errors_1β€Ž

Lines changed: 0 additions & 9 deletions
This file was deleted.

β€Žinternal/test_helpers/scenarios/fail_scanning_errors_1/app/main.pyβ€Ž

Lines changed: 0 additions & 32 deletions
This file was deleted.

β€Žinternal/test_helpers/scenarios/fail_scanning_errors_1/app/scanner.pyβ€Ž

Lines changed: 0 additions & 75 deletions
This file was deleted.

β€Žinternal/test_helpers/scenarios/fail_scanning_errors_1/app/token.pyβ€Ž

Lines changed: 0 additions & 38 deletions
This file was deleted.

β€Žinternal/test_helpers/scenarios/fail_scanning_errors_1/codecrafters.ymlβ€Ž

Lines changed: 0 additions & 11 deletions
This file was deleted.

β€Žinternal/test_helpers/scenarios/fail_scanning_errors_1/your_program.shβ€Ž

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
Β (0)