Repository for test cases for homework programming tasks.
Structure of test cases
Getting test cases
Installing Git
Testing
Contributing test cases
Reporting bad test cases
Additional information
Authors
License
## Structure of test cases First 10 test cases are public and taken from a task and then N custom tests. Usually they are corner cases and huge tests that test lower and upper bound of program. And in between there are some normal cases to check results by hand.
###Non-git way
If you are not using git you can get whole repository by clicking clone or download button and then download zip. See picture below for explanation.
If you have some previuos folders with test cases and want to download only one (current) directory from repository you must:
- Copy link from current directory
- Go to this page DownGit
- Copy link in the field
- Click download
###Using git
If you don't have git installed first look at the section Installing Git. When you set up your git you can clone this repository to your local computer with this command:
git clone https://github.com/RokKos/FRI_Programiranje.git
Then you can go in repository by:
cd FRI_Programiranje/
To get new test cases from server run this comand:
git pull origin master
And now you can run commands from section Testing.
###On Linux
If you’re on Fedora for example, you can use yum:
sudo yum install git-all
If you’re on a Debian-based distribution like Ubuntu, try apt-get:
sudo apt-get install git-all
###On Windows or Mac There is special GUI Tool for these two on this link GitHub Desktop. There is also a documentation for this GUI on this link GitHub Desktop documentation
official instructions for installing git on each OS
## Testing (Remark - you don't need git to run your programs on test cases) You can test on all test cases by running this comand:
- On Linux
./tj.exe DNxx_yyyyyyyy.java DNxx_customTesti/ rezultati/
- On Windows
tj DNxx_yyyyyyyy.java DNxx_customTesti/ rezultati/
- On Mac
mono tj.exe DNxx_yyyyyyyy.java DNxx_customTesti/ rezultati/
Where xx is number of task and yyyyyyyy your registration number (vpisna številka).
There are also other options like:
- Run only one test case
./tj.exe DNxx_yyyyyyyy.java DNxx_customTesti/ rezultati/ -p 15
- Run one range of test cases
./tj.exe DNxx_yyyyyyyy.java DNxx_customTesti/ rezultati/ -p 15-20
This commands also work on Windows and Mac.
## Contributing test cases I will be very glad if someone contributed test cases. They can even be the most simple ones, because with more tests more mistakes can be found. Please try to verify your every test case if that's a possibility (on big test cases this is almost impossible).
Test case should consist of vhodXX.txt and izhodXX.txt, where XX is the number of test case. Please check that number of test case doesn't exist already.
You can fork this repository. All instructions are here. Then:
- Create and commit your test cases to your forked repository
- Create pull request to this repository
- I will look at the test cases and approve or propose to fix to your test case.
- I will pull your pull request to this repository
The other option is to send me e-mail with zipped test cases on e-mail: [email protected] with subject: Test cases for DNxx. And I will manualy include them into this repository.
## Reporting bad test cases If you find a test case with wrong input data or wrong output data (result). Create issue with name DNxx Test case yy and then add description of the problem. Or you can send me an e-mail with subject DNxx Test case yy.
## Additional information Any addiotional information about git, test cases, running program on test cases etc., you can contact me over Skype: Rok Kos or e-mail: [email protected].
- RokKos - RokKos
This project is licensed under the MIT License - see the LICENSE.md file for details.