You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
all-your-base: exception messages and empty/leading-zero handling the tests require are not documented #3185
Three things the all-your-base tests check are not stated anywhere in the exercise:
The eight error tests (BaseConverterTest.java:130-206) assert IllegalArgumentException with an exact message: "Bases must be at least 2." (six tests, for both bases), "Digits may not be negative." and "All digits must be strictly less than the base.".
empty list (:90-97) expects new int[]{} to convert to [0].
multiple zeros and leading zeros (:110-127) expect leading zeros to be accepted.
instructions.md only explains positional notation, there is no instructions.append.md, and the stub gives no hint. Earlier versions of these tests required the opposite for the last two points ("You must supply at least one digit.", "Digits may not contain leading zeros."), so a student who remembers them fails three tests without knowing why.
Proposed fix: add .docs/instructions.append.md with an "Input format" section and an "Exception messages" section in the same format as pov. Tests and the example solution stay unchanged. PR: #3183.
Activity
kahgoh commentedon Nov 23, 2026
Closing as unplanned because Exercism uses TDD. Seeing the test output or reading the test is part of the practice.