Skip to content

Commit 5aee5f4

Browse files
authored
Initial commit
0 parents  commit 5aee5f4

File tree

11 files changed

+26075
-0
lines changed

11 files changed

+26075
-0
lines changed

.editorconfig

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Default EditorConfig
2+
# see https://editorconfig.org/
3+
4+
# top-most EditorConfig file in this repository
5+
root = true
6+
7+
[*]
8+
indent_style = space
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = true
12+
insert_final_newline = true
13+
indent_size = 2
14+
15+
[*.{js,json}]
16+
17+
[*.{py,pyw}]
18+
indent_size = 4
19+
20+
[*.md]
21+
max_line_length = 80
22+
trim_trailing_whitespace = false
23+
24+
[*.tsv]
25+
trim_trailing_whitespace = false
26+
27+
[Makefile]
28+
indent_style = tab

.github/classroom/autograding.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"__deactivated_tests": [
3+
{
4+
"name": "cppcheck",
5+
"setup": "sudo apt install --assume-yes cppcheck",
6+
"run": "cppcheck --error-exitcode=1 .",
7+
"timeout": 1,
8+
"points": 1
9+
}
10+
],
11+
"tests": [
12+
{
13+
"name": "TODO_test",
14+
"setup": "mkdir -p build && cd build; cmake ..; make -j4",
15+
"run": "cd build; ./TODO_test",
16+
"timeout": 5,
17+
"points": TODO
18+
}
19+
]
20+
}

.github/workflows/classroom.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: GitHub Classroom Workflow
2+
3+
on: [push]
4+
5+
permissions:
6+
checks: write
7+
actions: read
8+
contents: read
9+
10+
jobs:
11+
build:
12+
name: Autograding
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- uses: education/autograding@v1

.gitignore

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# everything inside the build directory
2+
build/
3+
.kdev4/
4+
5+
# Kdevelop project files
6+
*.kdev4
7+
8+
# backup files
9+
*~
10+
11+
*.ii
12+
*.s
13+
*.o
14+
*.out
15+
*-swp
16+
17+
.directory
18+

CMakeLists.config

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
add_library(catch2 catch_amalgamated.cpp)
2+
3+
set(CMAKE_BUILD_TYPE Debug)
4+
set(CMAKE_CXX_EXTENSIONS OFF)
5+
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wconversion")
6+
set(CMAKE_CXX_STANDARD 20)
7+
8+
include(CTest)
9+

CMakeLists.txt

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
cmake_minimum_required(VERSION 3.18)
2+
project(TODO_CHANGEME VERSION 1.0)
3+
4+
include(CMakeLists.config)
5+
6+
set(CPP_SRCS # TODO: add all non-main source files
7+
${PROJECT_NAME}.cpp
8+
)
9+
10+
# add_executable(${PROJECT_NAME} main.cpp ${CPP_SRCS})
11+
12+
foreach(sourcefile ${CPP_SRCS})
13+
string(REPLACE ".cpp" "_test.cpp" testfile ${sourcefile})
14+
string(REPLACE ".cpp" "" testexecutable ${testfile})
15+
message(STATUS "${sourcefile} + ${testfile} => ${testexecutable}")
16+
add_executable(${testexecutable} ${sourcefile} ${testfile})
17+
target_link_libraries(${testexecutable} catch2)
18+
add_test(NAME ${testexecutable}
19+
COMMAND ${testexecutable})
20+
endforeach()

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 HTL-Bulme
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
3+
After finishing the below tasks, run the following commands to see if your code
4+
is correct.
5+
6+
```shell
7+
mkdir build && cd build
8+
cmake ..
9+
make -j4
10+
make test
11+
```
12+
13+
As an alternative to `make test` (or `ctest`) you can run the individual
14+
`test_*` executables.

_test.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
//#include ".hpp"
2+
3+
#include "catch_amalgamated.hpp"
4+
5+
6+
TEST_CASE("...", "[tag]") {
7+
CHECK(true);
8+
9+
SECTION("ChildAccount cannot be overdrawn") {
10+
REQUIRE(true);
11+
}
12+
}

0 commit comments

Comments
 (0)