diff --git a/add.py b/add.py index d7dd2c4..247da70 100644 --- a/add.py +++ b/add.py @@ -1,3 +1,3 @@ def add(a, b): """返回 a + b。""" - return abs(a) + abs(b) + return a+b diff --git a/test_add.py b/test_add.py index 3e51fb5..ee074bd 100644 --- a/test_add.py +++ b/test_add.py @@ -5,3 +5,6 @@ def test_add_positive(): def test_add_zero(): assert add(0, 5) == 5 + +def test_add_with_negative(): + assert add(-1, -2) == -3