Skip to content

Commit

Permalink
Merge pull request #8 from gordon-cs/AP
Browse files Browse the repository at this point in the history
  • Loading branch information
jakedcolbert authored May 12, 2022
2 parents fcfdad0 + ff6c2be commit d0aaeca
Show file tree
Hide file tree
Showing 10 changed files with 152 additions and 373 deletions.
20 changes: 0 additions & 20 deletions .vscode/c_cpp_properties.json

This file was deleted.

19 changes: 0 additions & 19 deletions .vscode/launch.json

This file was deleted.

109 changes: 0 additions & 109 deletions .vscode/settings.json

This file was deleted.

33 changes: 10 additions & 23 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,62 +19,49 @@ project5: project5.cc province.cc province.h
g++ -std=c++11 -o project5 project5.cc province.cc

# 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-all: project5 test-requirement1 test-nowhere test-one-road test-simple test-local test-combo
@rm test.diff && rm test-data/project5.out

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.diff && rm project5.out
test-requirement1: project5
./project5 < test-data/requirement1.in > test-data/project5.out
-@diff test-data/project5.out test-data/requirement1.out > test.diff && echo "$(GREEN)Passed!$(RESET)"

# 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
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"
-@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
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"
-@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
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"
-@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
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"
-@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
rm test.diff && rm project5.out
@echo "$(GREEN)Passed!$(RESET)"
-@diff test-data/project5.out test-data/t0502-combo.out > test.diff && echo "$(GREEN)Passed!$(RESET)"
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
- **Requirement 3 : Upgrading**

> minSpan() method implemented to find ideal connections for faster traversals and output recomendations to the terminal. Passes all tests with no diff issues and correct stylings. Completed by Elijah Opoku-Nyarko with later revisions by Jake Colbert.
> minSpan() method implemented to find ideal connections for faster traversals and output recomendations to the terminal. Passes most tests with occasional error and correct stylings. Completed by Elijah Opoku-Nyarko with later revisions by Jake Colbert.
- **Requirement 4 : Worst-Case Analysis of Bridge Collapse**

> removeBridges() method implemented to find towns that would form isolated groups on bridge collapse. Passes all tests with some diff issues regarding ordering and correct stylings. Completed by Elijah Opoku-Nyarko with output revisions by Jake Colbert.
- **Requirement 5 : Articulation Points**

> articulationPoints() method implemented to find points of the graph at which their destruction would disconnect the province graph. Does not pass tests. isAP[] array does not get modified by the recursive method and prints all zeros as it was initialized. In-Progress by Jake Colbert
> articulationPoints() method implemented to find points of the graph at which their destruction would disconnect the province graph. Passes all tests with no diff issues and correct stylings. Completed by Jake Colbert.
### Makefile & Testing

Expand Down
Loading

0 comments on commit d0aaeca

Please sign in to comment.