GREEN: Fix empty string bug
- Changed return value from 1 to 0 for empty string - Test now passes: empty string returns 0
This commit is contained in:
parent
e38bac9441
commit
164adf815d
1 changed files with 1 additions and 1 deletions
|
|
@ -12,7 +12,7 @@ class StringCalculator {
|
|||
int add(String numbers) {
|
||||
// Bug 1: Empty string handling
|
||||
if (numbers.isEmpty) {
|
||||
return 1; // Should return 0
|
||||
return 0; // Fixed: Return 0 for empty string
|
||||
}
|
||||
|
||||
// Bug 2: Single number parsing
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue