RED: Test exposing single number parsing bug
- Test expects single number '5' to return 5 - Currently returns 6 (off-by-one error) - Expected: <5>, Actual: <6>
This commit is contained in:
parent
164adf815d
commit
d30267bcc6
1 changed files with 5 additions and 0 deletions
|
|
@ -12,5 +12,10 @@ void main() {
|
||||||
test('empty string returns 0', () {
|
test('empty string returns 0', () {
|
||||||
expect(calculator.add(''), equals(0));
|
expect(calculator.add(''), equals(0));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('single number returns that number', () {
|
||||||
|
expect(calculator.add('5'), equals(5));
|
||||||
|
expect(calculator.add('42'), equals(42));
|
||||||
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue