C++
Last updated
Last updated
To create a new assignment in C++, click into one of your courses, and then click Add assignment
.
Choose C++
from the drop-down list of available backend languages and set the the rest of your assignment's parameters (deadline, etc.).
Once the assignment is created, a new folder will be created in the private GitHub
/GitLab
template repository for the course in which you are added this assignment. This folder will contain a standard C++
project structure:
If you would like to add tests that are automatically run by AssignmentOS against each student's solution to your assignment, you can add these as unit test files in the test/
directory.
All unit test filenames must end with _test.cpp
and must use the GoogleTest testing framework.
For your unit test files to be recognised by GoogleTest
, each unit test file must be included as an argument in the add_executable()
command in the test/CMakeLists.txt
file.
Note that hidden unit tests are not yet supported for C++ assignments.
GitHub Action & GitLab CI/CD
AssignmentOS uses either GitHub Actions
or GitLab CI/CD
(depending on whether you use with GitHub or GitLab) to run automated unit tests.
We provide the following GitHub Action & GitLab CI/CD file for C++ assignments. Note that this file is added dynamically to the repo of each student taking your assignment, so please do not include it in your template repo. This file also cannot be changed.
GitHub Action .yml file | GitLab CI/CD .yml file |
---|---|
Coming soon! |
An example C++
assignment that uses automated test suite scoring can be seen here:
https://github.com/AssignmentOS-HQ/CPP-AssignmentOS-Fibonacci.