Compare commits

...

3 Commits

Author SHA1 Message Date
pumcookie
72aac0894d trying merge 2025-11-17 15:23:42 +01:00
pumcookie
0da8b5ee41 Merge remote-tracking branch 'origin/main' 2025-11-17 15:07:56 +01:00
b73ba1a0e0 Merge branch 'project_tests'
# Conflicts:
#	cmake-build-debug/Prog3B.exe
#	cmake-build-debug/Testing/Temporary/LastTest.log
2025-11-17 15:00:11 +01:00
6 changed files with 97 additions and 25 deletions

View File

@ -1,2 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CIDR" type="CPP_MODULE" version="4" />
<module classpath="CMake" type="CPP_MODULE" version="4" />

1
.idea/modules.xml generated
View File

@ -2,6 +2,7 @@
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Programmieren 3B.iml" filepath="$PROJECT_DIR$/.idea/Programmieren 3B.iml" />
<module fileurl="file://$PROJECT_DIR$/.idea/Stone_Development.iml" filepath="$PROJECT_DIR$/.idea/Stone_Development.iml" />
</modules>
</component>

57
.idea/workspace.xml generated
View File

@ -92,7 +92,7 @@
<component name="ClangdSettings">
<option name="formatViaClangd" value="false" />
</component>
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug-MinGW" />
<component name="ExecutionTargetManager" SELECTED_TARGET="CMakeBuildProfile:Debug" />
<component name="Git.Settings">
<option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
</component>
@ -105,30 +105,30 @@
<option name="hideEmptyMiddlePackages" value="true" />
<option name="showLibraryContents" value="true" />
</component>
<component name="PropertiesComponent"><![CDATA[{
"keyToString": {
"CMake Application.Prog3B.executor": "Run",
"CMake Application.Prog3B_tests.executor": "Run",
"RunOnceActivity.RadMigrateCodeStyle": "true",
"RunOnceActivity.ShowReadmeOnStart": "true",
"RunOnceActivity.cidr.known.project.marker": "true",
"RunOnceActivity.git.unshallow": "true",
"RunOnceActivity.readMode.enableVisualFormatting": "true",
"RunOnceActivity.west.config.association.type.startup.service": "true",
"cf.first.check.clang-format": "false",
"cidr.known.project.marker": "true",
"git-widget-placeholder": "main",
"last_opened_file_path": "C:/Users/marce/Desktop/Prog Praktikum C++/Vorlesung/Lambda",
"node.js.detected.package.eslint": "true",
"node.js.detected.package.tslint": "true",
"node.js.selected.package.eslint": "(autodetect)",
"node.js.selected.package.tslint": "(autodetect)",
"nodejs_package_manager_path": "npm",
"settings.editor.selected.configurable": "CMakeSettings",
"vue.rearranger.settings.migration": "true"
<component name="PropertiesComponent">{
&quot;keyToString&quot;: {
&quot;CMake Application.Prog3B.executor&quot;: &quot;Run&quot;,
&quot;CMake Application.Prog3B_tests.executor&quot;: &quot;Run&quot;,
&quot;RunOnceActivity.RadMigrateCodeStyle&quot;: &quot;true&quot;,
&quot;RunOnceActivity.ShowReadmeOnStart&quot;: &quot;true&quot;,
&quot;RunOnceActivity.cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;RunOnceActivity.git.unshallow&quot;: &quot;true&quot;,
&quot;RunOnceActivity.readMode.enableVisualFormatting&quot;: &quot;true&quot;,
&quot;RunOnceActivity.west.config.association.type.startup.service&quot;: &quot;true&quot;,
&quot;cf.first.check.clang-format&quot;: &quot;false&quot;,
&quot;cidr.known.project.marker&quot;: &quot;true&quot;,
&quot;git-widget-placeholder&quot;: &quot;main&quot;,
&quot;last_opened_file_path&quot;: &quot;C:/Users/marce/Desktop/Prog Praktikum C++/Vorlesung/Lambda&quot;,
&quot;node.js.detected.package.eslint&quot;: &quot;true&quot;,
&quot;node.js.detected.package.tslint&quot;: &quot;true&quot;,
&quot;node.js.selected.package.eslint&quot;: &quot;(autodetect)&quot;,
&quot;node.js.selected.package.tslint&quot;: &quot;(autodetect)&quot;,
&quot;nodejs_package_manager_path&quot;: &quot;npm&quot;,
&quot;settings.editor.selected.configurable&quot;: &quot;CMakeSettings&quot;,
&quot;vue.rearranger.settings.migration&quot;: &quot;true&quot;
}
}]]></component>
<component name="RunManager">
}</component>
<component name="RunManager" selected="CMake Application.Prog3B">
<configuration default="true" type="CLionExternalRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true">
<method v="2">
<option name="CLION.EXTERNAL.BUILD" enabled="true" />
@ -139,6 +139,15 @@
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<configuration name="Prog3B_tests" type="CMakeRunConfiguration" factoryName="Application" REDIRECT_INPUT="false" ELEVATE="false" USE_EXTERNAL_CONSOLE="false" EMULATE_TERMINAL="false" PASS_PARENT_ENVS_2="true" PROJECT_NAME="Prog3B" TARGET_NAME="Prog3B_tests" CONFIG_NAME="Debug-MinGW" RUN_TARGET_PROJECT_NAME="Prog3B" RUN_TARGET_NAME="Prog3B_tests">
<method v="2">
<option name="com.jetbrains.cidr.execution.CidrBuildBeforeRunTaskProvider$BuildBeforeRunTask" enabled="true" />
</method>
</configuration>
<list>
<item itemvalue="CMake Application.Prog3B" />
<item itemvalue="CMake Application.Prog3B_tests" />
</list>
</component>
<component name="SpellCheckerSettings" RuntimeDictionaries="0" Folders="0" CustomDictionaries="0" DefaultDictionary="application-level" UseSingleDictionary="true" transferred="true" />
<component name="TaskManager">

View File

@ -15,6 +15,7 @@ endif()
set(SRC_FILES
${CMAKE_CURRENT_LIST_DIR}/main.cpp
${CMAKE_CURRENT_LIST_DIR}/gamecube.cpp
tests.cpp
)
set(INCLUDE_DIRS
@ -48,6 +49,8 @@ endif()
add_executable(${EXECUTABLE_NAME} ${SRC_FILES})
target_include_directories(${EXECUTABLE_NAME} PRIVATE ${INCLUDE_DIRS})
# === Bibliotheken verlinken ===
target_link_libraries(${EXECUTABLE_NAME} PRIVATE
${CMAKE_CURRENT_LIST_DIR}/${OS_DIR}/libgamematrix.a
@ -68,3 +71,7 @@ if(APPLE)
)
endif()
add_executable(Prog3B_tests tests.cpp)
set_target_properties(Prog3B_tests PROPERTIES WIN32_EXECUTABLE OFF)

13
tests.cpp Normal file
View File

@ -0,0 +1,13 @@
#include <array>
int main()
{
}
bool test_matmul()
{
}

42
tests.txt Normal file
View File

@ -0,0 +1,42 @@
========================================================
Projekt: gamematrix (C++ Library)
Rolle: Tester
Datei: tests.txt
Datum: ____________________
Team: ____________________
========================================================
# ----------------------------
# 1. Testplan Übersicht
# ----------------------------
Ziel: Überprüfung der Funktionen matmul(), translate(), rot3D().
| Funktion | Testfall | Eingabe | Erwartetes Ergebnis | Bemerkung |
|---------------|---------------------------|------------------------------|-----------------------------------|----------------------------|
| matmul | Identity * Identity | 4x4 Identity Matrizen | Identity | Basisfall |
| matmul | Beispielmatrizen | A=[[...]], B=[[...]] | C=[[...]] | Prüfen mit Handrechnung |
| translate | Verschiebung | Vec3 {1,2,3} | Matrix mit Translation 1,2,3 | Prüfen letzte Spalte |
| rot3D | Rotation Z 90° | angle_deg=90, axis='z' | (1,0,0) -> (0,1,0) | Prüfen Anwendung auf Vektor|
| rot3D | Rotation X 180° | angle_deg=180, axis='x' | (0,1,0) -> (0,-1,0) | Prüfen Anwendung auf Vektor|
| rot3D | Rotation Y 270° | angle_deg=270, axis='y' | (1,0,0) -> (0,0,-1) | Prüfen Anwendung auf Vektor|
# ----------------------------
# 2. Testdaten / Matrizen
# ----------------------------
- Matrizen für matmul: Identity, Beispiel A/B Matrizen
- Vektoren für translate: Vec3 {x, y, z}
- Vektoren für rot3D: Vec3 {1,0,0}, Vec3 {0,1,0}
# ----------------------------
# 3. Abnahmekriterien
# ----------------------------
- Alle Unit-Tests erfolgreich
- Keine Exceptions außer gewollt (z.B. ungültige Achse)
- Testbericht in tests.txt dokumentiert
========================================================
Hinweis:
- Diese Datei wird vom Tester gepflegt.
- Tester dokumentiert Input, Output, erwartetes Ergebnis und Erfolg/Fehler.
========================================================