Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I'm turning in the calculator assignment after finishing it. #1

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
I'm turning in the calculator assignment after finishing it.
  • Loading branch information
DonnieRaymond committed May 18, 2023
commit 322ab73d9f3b3174ca33ef879e4df00672966276
10 changes: 10 additions & 0 deletions calculator/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
objects = addition.o division.o main.o multiplication.o subtraction.o

calculator: $(objects)
cc -o calculator $(objects)

$(objects): %.o:%.c
cc -c $< -o $@

clean:
rm -f calculator $(objects)
Binary file added calculator/tests/.example_tests.py.swp
Binary file not shown.
8 changes: 6 additions & 2 deletions calculator/tests/your_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@

### ADD AT LEAST TWO TESTS HERE!


assert run("1 + 1").output == "2"
assert run("1 - 1").output == "0"
assert run("2 \* 2").output == "4"
assert run("6 / 3").output == "2"
assert run("34 plus 7").exit_status != 0
###

print("All tests passed!")
print("All tests passed!")