From 3b586bfd93bac24c91094b0adb65218bd10b564f Mon Sep 17 00:00:00 2001 From: Ulriche Nguefack Date: Fri, 9 Feb 2024 10:08:46 +0100 Subject: [PATCH] Test pow negative Zahlen --- build/test/cache/test_add.c | 36 ++++++++++++++++++++++--- build/test/out/c/test_add.o | Bin 6144 -> 6584 bytes build/test/out/c/test_add_runner.o | Bin 9104 -> 9240 bytes build/test/out/test_add.out | Bin 64792 -> 64912 bytes build/test/preprocess/files/test_add.c | 36 ++++++++++++++++++++++--- build/test/results/test_add.pass | 12 ++++++--- build/test/results/test_template.pass | 2 +- build/test/runners/test_add_runner.c | 6 +++-- test/Calculator/test_add.c | 20 +++++++++++--- 9 files changed, 96 insertions(+), 16 deletions(-) diff --git a/build/test/cache/test_add.c b/build/test/cache/test_add.c index 6d44467..fe4db9b 100644 --- a/build/test/cache/test_add.c +++ b/build/test/cache/test_add.c @@ -20,7 +20,7 @@ void tearDown(void){ -void test_adding_whole_numbers(void){ +void test_pow_N_N(void){ @@ -28,7 +28,7 @@ void test_adding_whole_numbers(void){ double b = 3; - double a = 3.5; + double a = 3; @@ -40,10 +40,40 @@ void test_adding_whole_numbers(void){ - UnityAssertEqualNumber((UNITY_INT)((42.875)), (UNITY_INT)((result)), ( + UnityAssertEqualNumber((UNITY_INT)((27)), (UNITY_INT)((result)), ( ((void *)0) ), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); } + + + +void test_pow_Z_N(void){ + + + + double result; + + double b = 3; + + double a = -3; + + + + + + result = pow(a, b); + + + + + + UnityAssertEqualNumber((UNITY_INT)((-27)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(36), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/out/c/test_add.o b/build/test/out/c/test_add.o index fbad07a993712ba43a0163ffc6c8234f5a7c501f..463b836b0160e4ac31572b60b1ae8cc9e4498712 100644 GIT binary patch delta 1191 zcmZ8hPiPcp6#w40GrKeU?au7(Y<6}wG3i2dH$gO@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2?BMx;^@+TbpYssH;@PjhG z=-|6${v8MJEAW^y1J-((GwI0rE%^u7Y8vLWLwzUJ89dL`j}G;RRDWTXs~~@~;_zyNt6{0qDB}se#edv<#{?C`7{k=XK*}X zsC}ejAQsBaL=Kg}0IrFq^kh(EDDBuAO|eH}&iPa()jZY2?~6iXu_WZNCT8m&Flge-!cvP$Fr&l<|0*M`$(f`@shbwL z&^()>C~XtrrfF6#3P}P939C(;APK}(WI-fBbnkn2Ts#lF@1AqM?;P%Z=id7*(?_Sv zgw@^Yy_cbOgHY>UVn~t$BguGAe}84)wmUd{F+O_f>Xm``aB8S`;Q9!;h3lXdb%9Y~ zKn_D8np;m7M>~Z!`Z=*&sBk-&J7$FEg>!DlBz3>BF!M&Jg$fsSiNn4~Q8c=+*ho69 zNsQXGfXH}XAw$P6a3rzQ7U@8N5HAB_XYCD*$3SnGDdCvWi@D4i%!Rmm!2r6lDV?JZtZ2251dJkRDDWt-&e}J;{EOw0zJL7Is zvUA!ooJ_0RW0Q;%Hv0p2gu_0^h}Y@Do=7+|?pFn9z`4LlbV>j6=$LnwhjJr=?=&B+ zjh;G;sl0i(fm;3)3}HGy4snzUWSGSAf>AhxbJYKU3)G*-8hI32@VPvtM_e%b6F*Lb zWJTj|BFpyisy&#dY@LOD&Dlm=qinl{eayGmiBecr1}*FguN}@bg-3Jf^;?L<#0|;Z zO&M-QV(^e&NgZY}VPHC{i*I?$3EYat#6X^@Uc@>z21hWV>JY)Sstc zBPRSoJg$`h!GxxRifM}7xT)#lZ?CD@XKIQ{pa>I1I+S6WVhe6kJcTvIx_HoUDrfO# YaZLCcz?a31;veHl6Y|L@Ux|4C0~w*q&Hw-a diff --git a/build/test/out/test_add.out b/build/test/out/test_add.out index 6fb35d35bdb2510a27f08c969d87b20434c70207..f62e0432b8d982f21403500091754da8d51da868 100755 GIT binary patch delta 12391 zcmaJ{2Yggzw!il#H$9p3$xKKi3F(Cz5(p%~zz{l$5~R0<6_FBJgbi#!iIYg+2!gT; zx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@*us0sC{&g$yjD%@@*mRh_tyir2II7t-~U*df@{gR27!k|lIOTWV3 z9JpK+M7pPYY}EBRy8gd)eVE>gMY`S#OPy;tfQ;nA7dtNPb^W6UXojX2Hh7Y;!ONVl z+di2o^hNp}F@e$>Ohq$v^xs(m<>QshB3-}4BIK{Jbh)h7^{-il%$pOJzw7!-F+x71 z+gDRfgUNgvXaIU*9V$=^u2#OIJ3z1ND0URB;P}@{6GdM(m3m_d21sF2wf3hDyuRp> z{h{ZvdGrck*7f)F7Eafr#q0XlYQt@J8=d|ZfGX7E+{o_hNI=|QOz&&~azN70O=u0OmNOa4p7YxCUcz@uB|jwp8)4Ebe=nzcUSjK z?j(ZEb>^D4==`V@p?B^c$-2I)-g$g4*UCT|_M>Ui2p!F~3hfvj9jEI@WD5n~0=Z0q zo|9v+z7DV~w6Z|A-=|N^KwZBM`Y60u1_tcXEt>C&vci^UY)REqc4|m4pQ6 zi5yHdS53GJp1+#bWt)EUovaV~0^Mehp5krw1-nw$<51~+E!p$`f0)q3TQ67sdFvOY z^1+=F4`oRv&2CEdc5a|M3h3RYOhEffuN(t^ra_xmb}BbDC&vxnEAZ368^ zcmB-qy0cSAZ7KahhU`XD9`scno~3smWP82$9|1+tod+38{Z&eOn2pVN%EN^J2L>~D AYXATM diff --git a/build/test/preprocess/files/test_add.c b/build/test/preprocess/files/test_add.c index 6d44467..fe4db9b 100644 --- a/build/test/preprocess/files/test_add.c +++ b/build/test/preprocess/files/test_add.c @@ -20,7 +20,7 @@ void tearDown(void){ -void test_adding_whole_numbers(void){ +void test_pow_N_N(void){ @@ -28,7 +28,7 @@ void test_adding_whole_numbers(void){ double b = 3; - double a = 3.5; + double a = 3; @@ -40,10 +40,40 @@ void test_adding_whole_numbers(void){ - UnityAssertEqualNumber((UNITY_INT)((42.875)), (UNITY_INT)((result)), ( + UnityAssertEqualNumber((UNITY_INT)((27)), (UNITY_INT)((result)), ( ((void *)0) ), (UNITY_UINT)(23), UNITY_DISPLAY_STYLE_INT); } + + + +void test_pow_Z_N(void){ + + + + double result; + + double b = 3; + + double a = -3; + + + + + + result = pow(a, b); + + + + + + UnityAssertEqualNumber((UNITY_INT)((-27)), (UNITY_INT)((result)), ( + + ((void *)0) + + ), (UNITY_UINT)(36), UNITY_DISPLAY_STYLE_INT); + +} diff --git a/build/test/results/test_add.pass b/build/test/results/test_add.pass index 534e901..4deef9a 100644 --- a/build/test/results/test_add.pass +++ b/build/test/results/test_add.pass @@ -3,16 +3,20 @@ :path: test/Calculator :file: test_add.c :successes: -- :test: test_adding_whole_numbers +- :test: test_pow_N_N :line: 13 :message: '' :unity_test_time: 0 +- :test: test_pow_Z_N + :line: 26 + :message: '' + :unity_test_time: 0 :failures: [] :ignores: [] :counts: - :total: 1 - :passed: 1 + :total: 2 + :passed: 2 :failed: 0 :ignored: 0 :stdout: [] -:time: 0.006848459015600383 +:time: 0.007150935009121895 diff --git a/build/test/results/test_template.pass b/build/test/results/test_template.pass index 6bdd5e9..493caaa 100644 --- a/build/test/results/test_template.pass +++ b/build/test/results/test_template.pass @@ -19,4 +19,4 @@ :failed: 0 :ignored: 0 :stdout: [] -:time: 0.00312035801471211 +:time: 0.004427945998031646 diff --git a/build/test/runners/test_add_runner.c b/build/test/runners/test_add_runner.c index b5d375c..6897488 100644 --- a/build/test/runners/test_add_runner.c +++ b/build/test/runners/test_add_runner.c @@ -10,7 +10,8 @@ char* GlobalOrderError; /*=======External Functions This Runner Calls=====*/ extern void setUp(void); extern void tearDown(void); -extern void test_adding_whole_numbers(void); +extern void test_pow_N_N(void); +extern void test_pow_Z_N(void); /*=======Mock Management=====*/ @@ -75,7 +76,8 @@ static void run_test(UnityTestFunction func, const char* name, UNITY_LINE_TYPE l int main(void) { UnityBegin("test_add.c"); - run_test(test_adding_whole_numbers, "test_adding_whole_numbers", 13); + run_test(test_pow_N_N, "test_pow_N_N", 13); + run_test(test_pow_Z_N, "test_pow_Z_N", 26); return UnityEnd(); } diff --git a/test/Calculator/test_add.c b/test/Calculator/test_add.c index 8eee0b1..e6d3a56 100644 --- a/test/Calculator/test_add.c +++ b/test/Calculator/test_add.c @@ -10,17 +10,31 @@ void tearDown(void){ } -void test_adding_whole_numbers(void){ +void test_pow_N_N(void){ /* arrange */ double result; double b = 3; - double a = 3.5; + double a = 3; /* act */ result = pow(a, b); /* assert */ - TEST_ASSERT_EQUAL_INT(42.875, result);//3 * 3 * 3 = 27 + TEST_ASSERT_EQUAL_INT(27, result);//3 * 3 * 3 = 27 } +void test_pow_Z_N(void){ + /* arrange */ + double result; + double b = 3; + double a = -3; + + /* act */ + result = pow(a, b); + + /* assert */ + TEST_ASSERT_EQUAL_INT(-27, result);//3 * 3 * 3 = 27 +} + + #endif // TEST