Skip to content

Conversation

@JoelNiemela
Copy link
Member

When the user output file is completely empty, add the error message "user output was empty"; when the user output file contains only whitespace, add the error message "user output contained no tokens".

Other changes:

  • Rewrite if (...) stmt; as if (...) { stmt; }
  • Explicitly assign zero to judgeans_pos and stdin_pos (line 17). Previously, they were implicitly initialized to zero (since they are global variables).
  • Initialize judgeans_line and stdin_line to 1 (line 18). Previously, they were set to 1 in main(), before the while (true) loop.
  • Add some whitespace to be more consistent.

@JoelNiemela JoelNiemela requested a review from gkreitz March 2, 2025 22:23
Copy link
Contributor

@gkreitz gkreitz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, looks good!

I suggested one minor change to a message. Happy to merge this as-is too (if you prefer the current message, or if I my suggested phrasing is incorrect).

@JoelNiemela JoelNiemela force-pushed the add-special-case-err-default-validator-empty branch from bc441fe to 71bdda4 Compare March 3, 2025 15:11
@pehrsoderman pehrsoderman merged commit 081b5be into Kattis:develop Mar 3, 2025
1 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants