-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
jakedcolbert
committed
May 4, 2022
1 parent
dbbc889
commit c26b8d5
Showing
8 changed files
with
263 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,74 @@ | ||
# Author: Elijah Opoku-Nyarko and Jake Colbert | ||
|
||
# define colors | ||
ifneq (,$(findstring xterm,${TERM})) | ||
RED := $(shell tput -Txterm setaf 1) | ||
GREEN := $(shell tput -Txterm setaf 2) | ||
RESET := $(shell tput -Txterm sgr0) | ||
else | ||
RED := "" | ||
GREEN := "" | ||
RESET := "" | ||
endif | ||
|
||
# default target | ||
all: project5 | ||
|
||
# compile the code into an executable called 'project1' using C++ 2011 | ||
project5: project5.cc province.cc province.h | ||
g++ -std=c++11 -o project5 project5.cc province.cc | ||
|
||
# test the code against an expected output file | ||
# this test should grow into a spaceship and end with blinkers | ||
test-requirement1: project5 | ||
# test all the code | ||
test-all: project5 test-nowhere test-one-road test-simple test-local test-combo | ||
@echo "" | ||
@echo "$(GREEN)Passed all tests!$(RESET)" | ||
@echo "" | ||
|
||
test: project5 | ||
./project5 < test-data/t0502-combo.in > test-data/project5.out | ||
diff test-data/project5.out test-data/shortest.out > test.diff | ||
rm test-data/project5.out | ||
|
||
# test the code against an expected output file | ||
test-nowhere: project5 | ||
@echo "" | ||
@echo "$(RED)--- Nowhere Test ---$(RESET)" | ||
@echo "" | ||
./project5 < test-data/t01-nowhere.in > test-data/project5.out | ||
diff test-data/project5.out test-data/t01-nowhere.out > test.diff | ||
@echo "$(GREEN)Passed!$(RESET)" | ||
|
||
# test the code against an expected output file | ||
test-one-road: project5 | ||
@echo "" | ||
@echo "$(RED)--- One Road Test ---$(RESET)" | ||
@echo "" | ||
./project5 < test-data/t02-one-road.in > test-data/project5.out | ||
diff test-data/project5.out test-data/t02-one-road.out > test.diff | ||
@echo "$(GREEN)Passed!$(RESET)" | ||
|
||
# test the code against an expected output file | ||
test-simple: project5 | ||
@echo "" | ||
@echo "$(RED)--- Simple Test ---$(RESET)" | ||
@echo "" | ||
./project5 < test-data/t03-simple.in > test-data/project5.out | ||
diff test-data/project5.out test-data/t03-simple.out > test.diff | ||
@echo "$(GREEN)Passed!$(RESET)" | ||
|
||
# test the code against an expected output file | ||
test-local: project5 | ||
@echo "" | ||
@echo "$(RED)--- Local Test ---$(RESET)" | ||
@echo "" | ||
./project5 < test-data/t08-local.in > test-data/project5.out | ||
diff test-data/project5.out test-data/t08-local.out > test.diff | ||
@echo "$(GREEN)Passed!$(RESET)" | ||
|
||
# test the code against an expected output file | ||
test-combo: project5 | ||
@echo "" | ||
@echo "$(RED)--- Combo Test ---$(RESET)" | ||
@echo "" | ||
./project5 < test-data/t0502-combo.in > test-data/project5.out | ||
diff test-data/project5.out test-data/t0502-combo.out > test.diff | ||
@echo "$(GREEN)Passed!$(RESET)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.