Browse Source

Unittest 1 für richtige Eingabe index1

remotes/origin/Florian
Florian Baeseler 11 months ago
parent
commit
f0b9322d8b
  1. 4
      build/test/cache/defines_dependency.yml
  2. 55
      build/test/cache/test_casualQuiz.c
  3. 1
      build/test/dependencies/casualQuiz.d
  4. 5
      build/test/dependencies/test_casualQuiz.d
  5. BIN
      build/test/out/c/casualQuiz.o
  6. BIN
      build/test/out/c/test_casualQuiz.o
  7. BIN
      build/test/out/c/test_casualQuiz_runner.o
  8. BIN
      build/test/out/test_casualQuiz.out
  9. BIN
      build/test/out/test_quizduell.out
  10. BIN
      build/test/out/test_timequiz.out
  11. BIN
      build/test/out/test_wwm.out
  12. 55
      build/test/preprocess/files/test_casualQuiz.c
  13. 4
      build/test/preprocess/includes/test_casualQuiz.c
  14. 16
      build/test/results/test_casualQuiz.pass
  15. 2
      build/test/results/test_quizduell.pass
  16. 2
      build/test/results/test_timequiz.pass
  17. 2
      build/test/results/test_wwm.pass
  18. 36
      build/test/runners/test_casualQuiz_runner.c
  19. 28
      test/test_casualQuiz.c

4
build/test/cache/defines_dependency.yml

@ -1 +1,3 @@
--- {}
---
src/casualQuiz.c:
- TEST

55
build/test/cache/test_casualQuiz.c

@ -0,0 +1,55 @@
#include "src/casualQuiz.h"
#include "C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
void setUp(void) {
}
void tearDown(void) {
}
void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){
int TESTeingabe = 1;
int TESTindex = 0;
int TESTrichtige_antwort[]={1};
_Bool
testfall;
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex);
do {if ((testfall ==
1
)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(25)));}} while(0);
}

1
build/test/dependencies/casualQuiz.d

@ -0,0 +1 @@
build/test/out/c/casualQuiz.o: src/casualQuiz.c src/casualQuiz.h

5
build/test/dependencies/test_casualQuiz.d

@ -1 +1,4 @@
build/test/out/c/test_casualQuiz.o: test/test_casualQuiz.c
build/test/out/c/test_casualQuiz.o: test/test_casualQuiz.c \
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \
src/casualQuiz.h

BIN
build/test/out/c/casualQuiz.o

BIN
build/test/out/c/test_casualQuiz.o

BIN
build/test/out/c/test_casualQuiz_runner.o

BIN
build/test/out/test_casualQuiz.out

BIN
build/test/out/test_quizduell.out

BIN
build/test/out/test_timequiz.out

BIN
build/test/out/test_wwm.out

55
build/test/preprocess/files/test_casualQuiz.c

@ -0,0 +1,55 @@
#include "src/casualQuiz.h"
#include "C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
void setUp(void) {
}
void tearDown(void) {
}
void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){
int TESTeingabe = 1;
int TESTindex = 0;
int TESTrichtige_antwort[]={1};
_Bool
testfall;
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex);
do {if ((testfall ==
1
)) {} else {UnityFail( ((" Expected TRUE Was FALSE")), (UNITY_UINT)((UNITY_UINT)(25)));}} while(0);
}

4
build/test/preprocess/includes/test_casualQuiz.c

@ -1 +1,3 @@
--- []
---
- C:/Ruby30-x64/lib/ruby/gems/3.0.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h
- src/casualQuiz.h

16
build/test/results/test_casualQuiz.pass

@ -2,13 +2,19 @@
:source:
:path: test
:file: test_casualQuiz.c
:successes: []
:successes:
- :test: test_FcheckaufRichtigkeit_correct_answer_atIndex1
:line: 18
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 0
:passed: 0
:total: 1
:passed: 1
:failed: 0
:ignored: 0
:stdout: []
:time: 0.03847999998833984
:stdout:
- Case 1
- Right Answer, well done.
:time: 0.01348839999991469

2
build/test/results/test_quizduell.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.040792099985992536
:time: 0.03404470000532456

2
build/test/results/test_timequiz.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.04975489998469129
:time: 0.03424040001118556

2
build/test/results/test_wwm.pass

@ -11,4 +11,4 @@
:failed: 0
:ignored: 0
:stdout: []
:time: 0.0336890000035055
:time: 0.034191499988082796

36
build/test/runners/test_casualQuiz_runner.c

@ -10,6 +10,7 @@ char* GlobalOrderError;
/*=======External Functions This Runner Calls=====*/
extern void setUp(void);
extern void tearDown(void);
extern void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void);
/*=======Mock Management=====*/
@ -26,12 +27,6 @@ static void CMock_Destroy(void)
{
}
/*=======Setup (stub)=====*/
void setUp(void) {}
/*=======Teardown (stub)=====*/
void tearDown(void) {}
/*=======Test Reset Options=====*/
void resetTest(void);
void resetTest(void)
@ -48,10 +43,39 @@ void verifyTest(void)
CMock_Verify();
}
/*=======Test Runner Used To Run Each Test=====*/
static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE line_num)
{
Unity.CurrentTestName = name;
Unity.CurrentTestLineNumber = line_num;
#ifdef UNITY_USE_COMMAND_LINE_ARGS
if (!UnityTestMatches())
return;
#endif
Unity.NumberOfTests++;
UNITY_CLR_DETAILS();
UNITY_EXEC_TIME_START();
CMock_Init();
if (TEST_PROTECT())
{
setUp();
func();
}
if (TEST_PROTECT())
{
tearDown();
CMock_Verify();
}
CMock_Destroy();
UNITY_EXEC_TIME_STOP();
UnityConcludeTest();
}
/*=======MAIN=====*/
int main(void)
{
UnityBegin("test_casualQuiz.c");
run_test(test_FcheckaufRichtigkeit_correct_answer_atIndex1, "test_FcheckaufRichtigkeit_correct_answer_atIndex1", 18);
return UnityEnd();
}

28
test/test_casualQuiz.c

@ -0,0 +1,28 @@
#ifdef TEST
#include <stdbool.h>
#include <stdio.h>
#include "unity.h"
#include "casualQuiz.h"
// Test setup function
void setUp(void) {
}
// Test teardown function
void tearDown(void) {
}
void test_FcheckaufRichtigkeit_correct_answer_atIndex1(void){
int TESTeingabe = 1;
int TESTindex = 0;
int TESTrichtige_antwort[]={1};
bool testfall;
testfall = FcheckaufRichtigkeit(TESTeingabe, TESTrichtige_antwort, TESTindex);
TEST_ASSERT_TRUE(testfall == true);
}
#endif //Test
Loading…
Cancel
Save