Browse Source

Testdateien

remotes/origin/factorialdev
Lennart Goetze 11 months ago
parent
commit
1dd1485202
  1. 2
      build/test/cache/defines_dependency.yml
  2. 163
      build/test/cache/test_temperatur.c
  3. 1
      build/test/dependencies/temperatur.d
  4. 4
      build/test/dependencies/test_temperatur.d
  5. 4
      build/test/dependencies/test_temperatur_runner.d
  6. BIN
      build/test/out/c/MatheSpiele.o
  7. BIN
      build/test/out/c/temperatur.o
  8. BIN
      build/test/out/c/test_WortSpiel.o
  9. BIN
      build/test/out/c/test_temperatur.o
  10. BIN
      build/test/out/c/test_temperatur_runner.o
  11. BIN
      build/test/out/test_MatheSpiele.out
  12. BIN
      build/test/out/test_WortSpiel.out
  13. BIN
      build/test/out/test_temperatur.out
  14. 163
      build/test/preprocess/files/test_temperatur.c
  15. 3
      build/test/preprocess/includes/test_temperatur.c
  16. 2
      build/test/results/test_MatheSpiele.pass
  17. 2
      build/test/results/test_SchereSteinPapier.pass
  18. 2
      build/test/results/test_WortSpiel.pass
  19. 2
      build/test/results/test_ageinseconds.pass
  20. 2
      build/test/results/test_bmi.pass
  21. 2
      build/test/results/test_minirechner.pass
  22. 46
      build/test/results/test_temperatur.pass
  23. 2
      build/test/results/test_zahlenraten.pass
  24. 95
      build/test/runners/test_temperatur_runner.c

2
build/test/cache/defines_dependency.yml

@ -13,3 +13,5 @@ src/bmi.c:
- TEST - TEST
src/MatheSpiele.c: src/MatheSpiele.c:
- TEST - TEST
src/temperatur.c:
- TEST

163
build/test/cache/test_temperatur.c

@ -0,0 +1,163 @@
#include "src/temperatur.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_temperaturRechner_CzuF(void)
{
float result = CzuF(25);
float expected = 77;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(19), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_CzuK(void)
{
float result = CzuK(25);
float expected = 298.15;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(26), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_FzuC(void)
{
float result = FzuC(77);
float expected = 25;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(34), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_FzuK(void)
{
float result = FzuK(77);
float expected = 298.15;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(40), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_KzuC(void)
{
float result = KzuC(298.15);
float expected = 25;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(47), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_KzuF(void)
{
float result = KzuF(298.15);
float expected = 77;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(53), UNITY_DISPLAY_STYLE_INT);
}
void test_returnUnit_first(void)
{
const char *result = getFirstUnit(1);
char expected[] = "Celsius";
UnityAssertEqualString((const char*)((expected)), (const char*)((result)), (
((void *)0)
), (UNITY_UINT)(60));
}
void test_returnUnit_second(void)
{
const char *result = getSecondUnit(2);
char expected[] = " Kelvin";
UnityAssertEqualString((const char*)((expected)), (const char*)((result)), (
((void *)0)
), (UNITY_UINT)(66));
}

1
build/test/dependencies/temperatur.d

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

4
build/test/dependencies/test_temperatur.d

@ -0,0 +1,4 @@
build/test/out/c/test_temperatur.o: test/test_temperatur.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/temperatur.h

4
build/test/dependencies/test_temperatur_runner.d

@ -0,0 +1,4 @@
build/test/out/c/test_temperatur_runner.o: \
build/test/runners/test_temperatur_runner.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

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

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

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

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

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

BIN
build/test/out/test_MatheSpiele.out

BIN
build/test/out/test_WortSpiel.out

BIN
build/test/out/test_temperatur.out

163
build/test/preprocess/files/test_temperatur.c

@ -0,0 +1,163 @@
#include "src/temperatur.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_temperaturRechner_CzuF(void)
{
float result = CzuF(25);
float expected = 77;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(19), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_CzuK(void)
{
float result = CzuK(25);
float expected = 298.15;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(26), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_FzuC(void)
{
float result = FzuC(77);
float expected = 25;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(34), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_FzuK(void)
{
float result = FzuK(77);
float expected = 298.15;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(40), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_KzuC(void)
{
float result = KzuC(298.15);
float expected = 25;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(47), UNITY_DISPLAY_STYLE_INT);
}
void test_temperaturRechner_KzuF(void)
{
float result = KzuF(298.15);
float expected = 77;
UnityAssertEqualNumber((UNITY_INT)((expected)), (UNITY_INT)((result)), (
((void *)0)
), (UNITY_UINT)(53), UNITY_DISPLAY_STYLE_INT);
}
void test_returnUnit_first(void)
{
const char *result = getFirstUnit(1);
char expected[] = "Celsius";
UnityAssertEqualString((const char*)((expected)), (const char*)((result)), (
((void *)0)
), (UNITY_UINT)(60));
}
void test_returnUnit_second(void)
{
const char *result = getSecondUnit(2);
char expected[] = " Kelvin";
UnityAssertEqualString((const char*)((expected)), (const char*)((result)), (
((void *)0)
), (UNITY_UINT)(66));
}

3
build/test/preprocess/includes/test_temperatur.c

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

2
build/test/results/test_MatheSpiele.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.853215300001466
:time: 0.8709238999999798

2
build/test/results/test_SchereSteinPapier.pass

@ -19,4 +19,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.06440469999870402
:time: 0.31249270000012075

2
build/test/results/test_WortSpiel.pass

@ -59,4 +59,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.056614699999045115
:time: 0.32561580000015056

2
build/test/results/test_ageinseconds.pass

@ -23,4 +23,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.05363690000012866
:time: 0.32248630000003686

2
build/test/results/test_bmi.pass

@ -19,4 +19,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.05756960000144318
:time: 0.3210225000000264

2
build/test/results/test_minirechner.pass

@ -83,4 +83,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.05367609999666456
:time: 0.3090987000000496

46
build/test/results/test_temperatur.pass

@ -0,0 +1,46 @@
---
:source:
:path: test
:file: test_temperatur.c
:successes:
- :test: test_temperaturRechner_CzuF
:line: 15
:message: ''
:unity_test_time: 0
- :test: test_temperaturRechner_CzuK
:line: 22
:message: ''
:unity_test_time: 0
- :test: test_temperaturRechner_FzuC
:line: 30
:message: ''
:unity_test_time: 0
- :test: test_temperaturRechner_FzuK
:line: 36
:message: ''
:unity_test_time: 0
- :test: test_temperaturRechner_KzuC
:line: 43
:message: ''
:unity_test_time: 0
- :test: test_temperaturRechner_KzuF
:line: 49
:message: ''
:unity_test_time: 0
- :test: test_returnUnit_first
:line: 56
:message: ''
:unity_test_time: 0
- :test: test_returnUnit_second
:line: 62
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 8
:passed: 8
:failed: 0
:ignored: 0
:stdout: []
:time: 0.32527379999987716

2
build/test/results/test_zahlenraten.pass

@ -15,4 +15,4 @@
:failed: 0 :failed: 0
:ignored: 0 :ignored: 0
:stdout: [] :stdout: []
:time: 0.0543950000028417
:time: 0.31821020000006683

95
build/test/runners/test_temperatur_runner.c

@ -0,0 +1,95 @@
/* AUTOGENERATED FILE. DO NOT EDIT. */
/*=======Automagically Detected Files To Include=====*/
#include "unity.h"
int GlobalExpectCount;
int GlobalVerifyOrder;
char* GlobalOrderError;
/*=======External Functions This Runner Calls=====*/
extern void setUp(void);
extern void tearDown(void);
extern void test_temperaturRechner_CzuF(void);
extern void test_temperaturRechner_CzuK(void);
extern void test_temperaturRechner_FzuC(void);
extern void test_temperaturRechner_FzuK(void);
extern void test_temperaturRechner_KzuC(void);
extern void test_temperaturRechner_KzuF(void);
extern void test_returnUnit_first(void);
extern void test_returnUnit_second(void);
/*=======Mock Management=====*/
static void CMock_Init(void)
{
GlobalExpectCount = 0;
GlobalVerifyOrder = 0;
GlobalOrderError = NULL;
}
static void CMock_Verify(void)
{
}
static void CMock_Destroy(void)
{
}
/*=======Test Reset Options=====*/
void resetTest(void);
void resetTest(void)
{
tearDown();
CMock_Verify();
CMock_Destroy();
CMock_Init();
setUp();
}
void verifyTest(void);
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_temperatur.c");
run_test(test_temperaturRechner_CzuF, "test_temperaturRechner_CzuF", 15);
run_test(test_temperaturRechner_CzuK, "test_temperaturRechner_CzuK", 22);
run_test(test_temperaturRechner_FzuC, "test_temperaturRechner_FzuC", 30);
run_test(test_temperaturRechner_FzuK, "test_temperaturRechner_FzuK", 36);
run_test(test_temperaturRechner_KzuC, "test_temperaturRechner_KzuC", 43);
run_test(test_temperaturRechner_KzuF, "test_temperaturRechner_KzuF", 49);
run_test(test_returnUnit_first, "test_returnUnit_first", 56);
run_test(test_returnUnit_second, "test_returnUnit_second", 62);
return UnityEnd();
}
Loading…
Cancel
Save