-
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.
Committer: Tamio Vesa Nakajima <[email protected]>
Made better tests Changes to be committed: new file: test/aplusb/src/almost_ok.cpp modified: test/aplusb/testmanifest deleted: test/correct_output new file: test/test.sh deleted: test/test_everything.sh
- Loading branch information
Tamio Vesa Nakajima
authored and
Tamio Vesa Nakajima
committed
May 21, 2018
1 parent
bde5b21
commit f5a720a
Showing
5 changed files
with
35 additions
and
50 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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include <fstream> | ||
using namespace std; | ||
|
||
int main(){ | ||
ifstream f("aplusb.in"); | ||
ofstream g("aplusb.out"); | ||
long long x, y; | ||
f >> x >> y; | ||
if((x+y)%10 == 0) g << -1 << endl; | ||
else g << x+y << endl; | ||
return 0; } |
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,2 +1,2 @@ | ||
1 fixed 10 | ||
3 random 90 | ||
1 random 90 |
This file was deleted.
Oops, something went wrong.
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,23 @@ | ||
project_directory=$(mktemp -d) | ||
|
||
echo Building project | ||
printf "aplusb\\n0.1" | ./makeproject "$project_directory" | ||
|
||
echo Copying files into project | ||
cp test/aplusb/incf/* "$project_directory/aplusb/incf" | ||
cp test/aplusb/ingen/* "$project_directory/aplusb/ingen" | ||
cp test/aplusb/okgen/* "$project_directory/aplusb/okgen" | ||
cp test/aplusb/eval/* "$project_directory/aplusb/eval" | ||
cp test/aplusb/src/* "$project_directory/aplusb/src" | ||
cp test/aplusb/testmanifest "$project_directory/aplusb/testmanifest" | ||
|
||
cd "$project_directory/aplusb" || exit 1 | ||
|
||
echo Running sources | ||
echo | ./buildtests | ||
./run | ||
./compare -s ok.cpp -s almost_ok.cpp -c random | ||
|
||
echo Cleanup | ||
|
||
rm -r "$project_directory" |
This file was deleted.
Oops, something went wrong.