Browse Source

test_Stueckzeitakkort

main
Celal Kir 2 years ago
parent
commit
ff5cc95bf4
  1. 45
      build/test/cache/test_Stueckzeitakkort.c
  2. 4
      build/test/dependencies/test_Stueckzeitakkort.d
  3. 4
      build/test/dependencies/test_Stueckzeitakkort_runner.d
  4. BIN
      build/test/out/c/funktion.o
  5. BIN
      build/test/out/c/test_Stueckzeitakkort.o
  6. BIN
      build/test/out/c/test_Stueckzeitakkort_runner.o
  7. BIN
      build/test/out/test_Stueckzeitakkort.out
  8. 45
      build/test/preprocess/files/test_Stueckzeitakkort.c
  9. 3
      build/test/preprocess/includes/test_Stueckzeitakkort.c
  10. 19
      build/test/results/test_Stueckzeitakkort.pass
  11. 81
      build/test/runners/test_Stueckzeitakkort_runner.c
  12. 1
      src/funktion.c
  13. 23
      test/test_Stueckzeitakkort.c

45
build/test/cache/test_Stueckzeitakkort.c

@ -0,0 +1,45 @@
#include "src/funktion.h"
#include "C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_Stueckzeitakkort_NeedToImplement(void)
{
double a =2;
double b = 0.5;
double c = 230;
double d = 140;
double result = Stueckzeitakkort(a,b,c,d);
double ergebnis = 96600;
UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((ergebnis)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((ergebnis))), (UNITY_FLOAT)((UNITY_FLOAT)((result))), ((
((void *)0)
)), (UNITY_UINT)((UNITY_UINT)(21)));
}

4
build/test/dependencies/test_Stueckzeitakkort.d

@ -0,0 +1,4 @@
build/test/out/c/test_Stueckzeitakkort.o: test/test_Stueckzeitakkort.c \
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h \
src/funktion.h

4
build/test/dependencies/test_Stueckzeitakkort_runner.d

@ -0,0 +1,4 @@
build/test/out/c/test_Stueckzeitakkort_runner.o: \
build/test/runners/test_Stueckzeitakkort_runner.c \
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h \
C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity_internals.h

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

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

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

BIN
build/test/out/test_Stueckzeitakkort.out

45
build/test/preprocess/files/test_Stueckzeitakkort.c

@ -0,0 +1,45 @@
#include "src/funktion.h"
#include "C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_Stueckzeitakkort_NeedToImplement(void)
{
double a =2;
double b = 0.5;
double c = 230;
double d = 140;
double result = Stueckzeitakkort(a,b,c,d);
double ergebnis = 96600;
UnityAssertFloatsWithin((UNITY_FLOAT)((UNITY_FLOAT)((ergebnis)) * (UNITY_FLOAT)(0.00001f)), (UNITY_FLOAT)((UNITY_FLOAT)((ergebnis))), (UNITY_FLOAT)((UNITY_FLOAT)((result))), ((
((void *)0)
)), (UNITY_UINT)((UNITY_UINT)(21)));
}

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

@ -0,0 +1,3 @@
---
- C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/ceedling-0.31.1/vendor/unity/src/unity.h
- src/funktion.h

19
build/test/results/test_Stueckzeitakkort.pass

@ -0,0 +1,19 @@
---
:source:
:path: test
:file: test_Stueckzeitakkort.c
:successes:
- :test: test_Stueckzeitakkort_NeedToImplement
:line: 13
:message: ''
:unity_test_time: 0
:failures: []
:ignores: []
:counts:
:total: 1
:passed: 1
:failed: 0
:ignored: 0
:stdout:
- '96600.000000'
:time: 0.026201200002105907

81
build/test/runners/test_Stueckzeitakkort_runner.c

@ -0,0 +1,81 @@
/* 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_Stueckzeitakkort_NeedToImplement(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_Stueckzeitakkort.c");
run_test(test_Stueckzeitakkort_NeedToImplement, "test_Stueckzeitakkort_NeedToImplement", 13);
return UnityEnd();
}

1
src/funktion.c

@ -93,6 +93,7 @@ double Akkortrichtsatz(double stueckkosten,double akkordzuschlag) {
double Stueckzeitakkort(double stueckkosten,double akkordzuschlag,double arbeitszeit,double menge) { double Stueckzeitakkort(double stueckkosten,double akkordzuschlag,double arbeitszeit,double menge) {
double stueckzeitakkord = stueckkosten * (1 + akkordzuschlag) * arbeitszeit * menge; double stueckzeitakkord = stueckkosten * (1 + akkordzuschlag) * arbeitszeit * menge;
printf("%f",stueckzeitakkord);
return stueckzeitakkord; return stueckzeitakkord;
} }

23
test/test_Stueckzeitakkort.c

@ -0,0 +1,23 @@
#include "unity.h"
#include "funktion.h"
void setUp(void)
{
}
void tearDown(void)
{
}
void test_Stueckzeitakkort_NeedToImplement(void)
{
double a =2;
double b = 0.5;
double c = 230;
double d = 140;
double result = Stueckzeitakkort(a,b,c,d);
double ergebnis = 96600;
TEST_ASSERT_EQUAL_FLOAT(ergebnis, result);
}
Loading…
Cancel
Save