feat: Add buggy String Calculator implementation
- Implements basic string calculator with 5 intentional bugs - Bug 1: Empty string returns 1 instead of 0 - Bug 2: Single number has off-by-one error - Bug 3: Summation loop misses last element - Bug 4: Newline delimiter not properly handled - Bug 5: Custom delimiter parsing broken - Ready for Bug Hunt Kata with TDD approach
This commit is contained in:
parent
3e737dfef3
commit
279c381872
3 changed files with 66 additions and 3 deletions
14
test/string_calculator_test.dart
Normal file
14
test/string_calculator_test.dart
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
import 'package:test/test.dart';
|
||||
import 'package:tdd_katas/string_calculator.dart';
|
||||
|
||||
void main() {
|
||||
group('String Calculator - Bug Hunt', () {
|
||||
late StringCalculator calculator;
|
||||
|
||||
setUp(() {
|
||||
calculator = StringCalculator();
|
||||
});
|
||||
|
||||
// Tests will be added as we hunt bugs
|
||||
});
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue