This repository has been archived by the owner on Jul 31, 2018. It is now read-only.
-
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.
a bash script for running test cases has been added
- Loading branch information
1 parent
1166c20
commit 7c82330
Showing
9 changed files
with
208 additions
and
7 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,27 @@ | ||
make clean | ||
#!/bin/bash | ||
|
||
make | ||
OUTPUT_DIR=output | ||
TEST_CASE_DIR=testcase | ||
|
||
./a.out | ||
# defining colors | ||
RED="\033[0;31m" | ||
GREEN="\033[0;32m" | ||
NC='\033[0m' # No Color | ||
|
||
MAINS=(main.cpp main-with-extra-players.cpp main-with-penalty.cpp main-with-inaquate-teams.cpp main-bigger-testcase.cpp) | ||
counter=1 | ||
for file in ${MAINS[*]}; do | ||
mkdir $OUTPUT_DIR | ||
yes | cp -i $file "main.cpp" | ||
make clean && make && ./a.out > $OUTPUT_DIR/out_$counter | ||
echo Testcase $counter is running: | ||
if diff $OUTPUT_DIR/out_$counter $TEST_CASE_DIR/out_$counter > /dev/null; then | ||
echo -e "${GREEN}Accepted${NC}" | ||
((accepted_test_cases++)) | ||
else | ||
echo -e "${RED}Wrong Answer${NC}" | ||
((wrong_test_cases++)) | ||
fi | ||
|
||
((counter++)) | ||
done |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Round 1 | ||
1: | ||
Arsenal 3 - 3 Barcelona | ||
Barcelona 4 - 2 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 2 | ||
1: | ||
Barcelona 2 - 2 Real Madrid | ||
Real Madrid 3 - 2 Barcelona | ||
=> winner: Real Madrid | ||
Round 1 | ||
1: | ||
Arsenal 3 - 3 Barcelona | ||
Barcelona 4 - 2 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 1 | ||
1: | ||
Arsenal 3 - 3 Barcelona | ||
Barcelona 4 - 2 Arsenal | ||
=> winner: Barcelona | ||
Round 2 | ||
1: | ||
Barcelona 2 - 2 Real Madrid | ||
Real Madrid 3 - 2 Barcelona | ||
=> winner: Real Madrid |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Round 1 | ||
1: | ||
Arsenal 2 - 4 Barcelona | ||
Barcelona 5 - 1 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 2 | ||
1: | ||
Barcelona 3 - 2 Real Madrid | ||
Real Madrid 2 - 2 Barcelona | ||
=> winner: Barcelona | ||
Round 1 | ||
1: | ||
Arsenal 2 - 4 Barcelona | ||
Barcelona 5 - 1 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 1 | ||
1: | ||
Arsenal 2 - 4 Barcelona | ||
Barcelona 5 - 1 Arsenal | ||
=> winner: Barcelona | ||
Round 2 | ||
1: | ||
Barcelona 3 - 2 Real Madrid | ||
Real Madrid 2 - 2 Barcelona | ||
=> winner: Barcelona |
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 |
---|---|---|
@@ -0,0 +1,33 @@ | ||
Round 1 | ||
1: | ||
Arsenal 2 - 4 Barcelona | ||
Barcelona 5 - 2 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 2 | ||
1: | ||
Barcelona 3 - 2 Real Madrid | ||
Real Madrid 3 - 2 Barcelona | ||
=> winner: Barcelona | ||
Round 1 | ||
1: | ||
Arsenal 2 - 4 Barcelona | ||
Barcelona 5 - 2 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 1 | ||
1: | ||
Arsenal 2 - 4 Barcelona | ||
Barcelona 5 - 2 Arsenal | ||
=> winner: Barcelona | ||
Round 2 | ||
1: | ||
Barcelona 3 - 2 Real Madrid | ||
Real Madrid 3 - 2 Barcelona | ||
=> winner: Barcelona |
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 |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Inadequate players in Barcelona | ||
Inadequate teams |
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 |
---|---|---|
@@ -0,0 +1,63 @@ | ||
Round 1 | ||
1: | ||
Arsenal 3 - 3 Barcelona | ||
Barcelona 4 - 2 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Chelse 2 - 2 City | ||
City 2 - 2 Chelse | ||
=> winner: City | ||
3: | ||
Liverpool 3 - 2 Milan | ||
Milan 3 - 2 Liverpool | ||
=> winner: Liverpool | ||
4: | ||
Real Madrid 3 - 1 United | ||
United 2 - 2 Real Madrid | ||
=> winner: Real Madrid | ||
Round 2 | ||
1: | ||
Barcelona 3 - 2 City | ||
City 3 - 3 Barcelona | ||
=> winner: Barcelona | ||
2: | ||
Liverpool 2 - 3 Real Madrid | ||
Real Madrid 4 - 1 Liverpool | ||
=> winner: Real Madrid | ||
Round 3 | ||
1: | ||
Barcelona 2 - 2 Real Madrid | ||
Real Madrid 3 - 2 Barcelona | ||
=> winner: Real Madrid | ||
Round 1 | ||
1: | ||
Arsenal 3 - 3 Barcelona | ||
Barcelona 4 - 2 Arsenal | ||
=> winner: Barcelona | ||
2: | ||
Chelse 2 - 2 City | ||
City 2 - 2 Chelse | ||
=> winner: City | ||
3: | ||
Liverpool 3 - 2 Milan | ||
Milan 3 - 2 Liverpool | ||
=> winner: Liverpool | ||
4: | ||
Real Madrid 3 - 1 United | ||
United 2 - 2 Real Madrid | ||
=> winner: Real Madrid | ||
Round 1 | ||
1: | ||
Arsenal 3 - 3 Barcelona | ||
Barcelona 4 - 2 Arsenal | ||
=> winner: Barcelona | ||
Round 2 | ||
1: | ||
Barcelona 3 - 2 City | ||
City 3 - 3 Barcelona | ||
=> winner: Barcelona | ||
Round 3 | ||
1: | ||
Barcelona 2 - 2 Real Madrid | ||
Real Madrid 3 - 2 Barcelona | ||
=> winner: Real Madrid |