Project Functionality test: Basic PlacesΒΆ
This practice grader runs a basic functionality test to ensure students have started working on the course project.
The name of the test file describes its purpose. This test focuses on the basic functionality of places being added and processed.
You will need to implement the following functions in order to pass the Basic Places tests:
- add_place
- all_places
- clear_all
- get_place_coord
- get_place_count
- get_place_name
- get_place_type
The test file is available for students under the directory:
prg1/functionality-compulsory
If the file is missing, update your local repository and pull the latest changes from the course upstream with the following command:
git pull course-upstream main --allow-unrelated-histories
You can execute the test locally as follows:
- First, compile the program, either in Qt Creator or in the command prompt:
qmake; make
- Execute the basic places test:
testread "functionality-compulsory/test-00-basic-places-in.txt" "functionality-compulsory/test-00-basic-places-out.txt"
You can do this either:
- In GUI:
then type or select the command testread from a dropdown menu and select both in and out files with the file picker, for example, "functionality-compulsory/test-00-basic-places-in.txt" "functionality-compulsory/test-00-basic-places-out.txt"./prg1
Note: You can change the working directory to the directory where the test files are located to simplify the testread command. With "functionality-compulsory" being part of the working directory, the command will be: testread "test-00-basic-places-in.txt" "test-00-basic-places-out.txt" Otherwise, include the path to the test files in the command. - By initiating the console mode:
and then running the testread command../prg1 --console
- By saving the above instructions in a file and giving the file as a parameter:
./prg1 cmd_file
- In GUI:
- Question marks (?) in the output of the testread command indicate found differences that must be resolved. With a large enough screen, your output versus the expected one is shown side-by-side.
Warning
Before attempting to grade your Project in Plussa, remember to push your commits to the remote repository. Otherwise, the grader will not find it.
A+ presents the exercise submission form here.