This project is designed to automate the testing and development of exercise solutions for the SoftUni C++ programming basics course. The project is built with C++ and uses CMake as a build system and Google Test (gtest) as a testing framework.
- CMake (minimum version 3.26)
- Google Test (gtest)
The project is structured as follows:
src/main.cpp: This is where the solution for the coding exercise is implemented. The solution must be implemented in theprocessmethod which accepts standard input (stdin) and produces standard output (stdout).tests/main_test.cpp: This file contains the unit tests for theprocessmethod. We use Google Test'sTestWithParamto be able to have multiple test scenarios. TheTestParamstruct accepts the test input and expected test result. Test scenarios are read from files, with each scenario separated by===.tests/testInputs.txt: This file contains the input for each test scenario. Each scenario is separated by===. The input for a scenario is the data that will be fed into the function or method you are testing.tests/testExpectedResults.txt: This file contains the expected output for each test scenario, also separated by===. The expected output is what you predict the function or method should return or output given the corresponding input fromtestInputs.txt.CMakeLists.txt: This file contains the CMake configuration for the project. It specifies the minimum required version of CMake, the project name, the C++ standard, and the dependencies of the project. It also sets up the executables for the main application and the tests.
To use this project, follow these steps:
- Implement your solution in the
processmethod insrc/main.cpp. - Add your test scenarios in
tests/testInputs.txtandtests/testExpectedResults.txt. Each test scenario should be separated by===. - Build the project using CMake.
- Run the tests to verify your solution.
- Once your solution is ready and all tests pass, copy the full content of
src/main.cppand paste it into the SoftUni judge system.
The following files and directories are ignored by git:
/.idea//cmake-build-debug//main
Please note that these files and directories are specific to the development environment and should not be included in the version control system.
This project is designed to automate the testing process and make it easier to develop solutions for the SoftUni C++ programming basics course. It is not intended to be a complete solution for all coding exercises. Always refer to the specific requirements of each exercise when implementing your solution.