diff --git a/.idea/Programmieren 3B.iml b/.idea/Programmieren 3B.iml index 4c94235..f08604b 100644 --- a/.idea/Programmieren 3B.iml +++ b/.idea/Programmieren 3B.iml @@ -1,2 +1,2 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index bff9f89..3795d21 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,6 +2,7 @@ + diff --git a/CMakeLists.txt b/CMakeLists.txt index 5537a88..f411af4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) + diff --git a/tests.cpp b/tests.cpp new file mode 100644 index 0000000..fc291e1 --- /dev/null +++ b/tests.cpp @@ -0,0 +1,13 @@ +#include + +int main() +{ + + +} + +bool test_matmul() +{ + + +} \ No newline at end of file diff --git a/tests.txt b/tests.txt new file mode 100644 index 0000000..2b301a5 --- /dev/null +++ b/tests.txt @@ -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. +======================================================== \ No newline at end of file