Skip to content

Commit

Permalink
Renamed test groups
Browse files Browse the repository at this point in the history
  • Loading branch information
Tellicious committed Oct 26, 2024
1 parent 993b281 commit aff3a63
Show file tree
Hide file tree
Showing 15 changed files with 37 additions and 36 deletions.
4 changes: 2 additions & 2 deletions tests/test_IIRFilters.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ static void test_IIRFilterIntegrator(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_IIRFilters[] = {
cmocka_unit_test(test_IIRFilterInit), cmocka_unit_test(test_IIRFilterInitLP), cmocka_unit_test(test_IIRFilterInitHP),
cmocka_unit_test(test_IIRFilterInitBP), cmocka_unit_test(test_IIRFilterInitBS), cmocka_unit_test(test_IIRFilterProcess),
cmocka_unit_test(test_IIRFilterDerivative), cmocka_unit_test(test_IIRFilterIntegrator),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_IIRFilters, NULL, NULL);
}
8 changes: 4 additions & 4 deletions tests/test_LKHashTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -203,9 +203,9 @@ static void test_lkHashTableDelete(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {cmocka_unit_test(test_lkHashTableInit), cmocka_unit_test(test_lkHashTablePutAndGet),
cmocka_unit_test(test_lkHashTableInfo), cmocka_unit_test(test_lkHashTableFlush),
cmocka_unit_test(test_lkHashTableDelete)};
const struct CMUnitTest test_LKHashTable[] = {cmocka_unit_test(test_lkHashTableInit), cmocka_unit_test(test_lkHashTablePutAndGet),
cmocka_unit_test(test_lkHashTableInfo), cmocka_unit_test(test_lkHashTableFlush),
cmocka_unit_test(test_lkHashTableDelete)};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_LKHashTable, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_LPHashTable.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ static void test_lpHashTableDelete(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_LPHashTable[] = {
cmocka_unit_test(test_lpHashTableInit),
cmocka_unit_test(test_lpHashTablePutAndGetResizeable),
cmocka_unit_test(test_lpHashTablePutAndGetNotResizeable),
Expand All @@ -330,5 +330,5 @@ int main(void) {
cmocka_unit_test(test_lpHashTableDelete),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_LPHashTable, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_PID.c
Original file line number Diff line number Diff line change
Expand Up @@ -202,11 +202,11 @@ static void test_PID_setGet(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_PID[] = {
cmocka_unit_test(test_PID_init), cmocka_unit_test(test_PID_calc),
cmocka_unit_test(test_PID_calcAeroClamp), cmocka_unit_test(test_PID_calcIntegralClamp),
cmocka_unit_test(test_PID_calcBackCalc), cmocka_unit_test(test_PID_setGet),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_PID, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_basicMath.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ static void test_functions(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_basicMath[] = {
cmocka_unit_test(test_macros),
cmocka_unit_test(test_functions),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_basicMath, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_button.c
Original file line number Diff line number Diff line change
Expand Up @@ -217,12 +217,12 @@ static void test_buttonGetStatus(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_button[] = {
cmocka_unit_test(test_buttonInit),
cmocka_unit_test(test_buttonEvent),
cmocka_unit_test(test_buttonGetPress),
cmocka_unit_test(test_buttonGetStatus),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_button, NULL, NULL);
}
9 changes: 5 additions & 4 deletions tests/test_event.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,9 +200,10 @@ static void test_eventDelete(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {cmocka_unit_test(test_eventInit), cmocka_unit_test(test_eventInitStatic), cmocka_unit_test(test_eventRegister),
cmocka_unit_test(test_eventRegisterEx), cmocka_unit_test(test_eventDispatch), cmocka_unit_test(test_eventDispatchEx),
cmocka_unit_test(test_eventDelete)};
const struct CMUnitTest test_event[] = {cmocka_unit_test(test_eventInit), cmocka_unit_test(test_eventInitStatic),
cmocka_unit_test(test_eventRegister), cmocka_unit_test(test_eventRegisterEx),
cmocka_unit_test(test_eventDispatch), cmocka_unit_test(test_eventDispatchEx),
cmocka_unit_test(test_eventDelete)};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_event, NULL, NULL);
}
8 changes: 4 additions & 4 deletions tests/test_hashFunctions.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@

/* Includes ------------------------------------------------------------------*/

#include <cmocka.h>
#include <setjmp.h>
#include <stdarg.h>
#include <stddef.h>
#include "hashFunctions.h"

#include <cmocka.h>

/* Functions -----------------------------------------------------------------*/

static void test_hash_FNV1A(void** state) {
Expand Down Expand Up @@ -105,11 +106,10 @@ static void test_hash_sdbm(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_hashFunctions[] = {
cmocka_unit_test(test_hash_FNV1A),
cmocka_unit_test(test_hash_djb),
cmocka_unit_test(test_hash_sdbm),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_hashFunctions, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_list.c
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ static void test_listIterator(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_list[] = {
cmocka_unit_test(test_listInit), cmocka_unit_test(test_listPush), cmocka_unit_test(test_listPushFull),
cmocka_unit_test(test_listPushFront), cmocka_unit_test(test_listPushFrontFull), cmocka_unit_test(test_listInsert),
cmocka_unit_test(test_listUpdate), cmocka_unit_test(test_listPop), cmocka_unit_test(test_listPopEmpty),
Expand All @@ -407,5 +407,5 @@ int main(void) {
cmocka_unit_test(test_listInfo), cmocka_unit_test(test_listFlush), cmocka_unit_test(test_listIterator),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_list, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_matrix.c
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ static void test_matrixPseudoInvStatic(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_matrix[] = {
cmocka_unit_test(test_matrixInit),
cmocka_unit_test(test_matrixDelete),
cmocka_unit_test(test_matrixDet),
Expand Down Expand Up @@ -526,5 +526,5 @@ int main(void) {
cmocka_unit_test(test_matrixSetAndGet),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_matrix, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_movingAvg.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,10 @@ static void test_movingAvgGetLatest(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_movingAvg[] = {
cmocka_unit_test(test_movingAvgInit), cmocka_unit_test(test_movingAvgDelete), cmocka_unit_test(test_movingAvgInitStatic),
cmocka_unit_test(test_movingAvgCalc), cmocka_unit_test(test_movingAvgFlush), cmocka_unit_test(test_movingAvgGetLatest),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_movingAvg, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_numMethods.c
Original file line number Diff line number Diff line change
Expand Up @@ -767,7 +767,7 @@ static void test_GaussNewton_Sens_Cal_6Static(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_numMethods[] = {
cmocka_unit_test(test_fwsub),
cmocka_unit_test(test_fwsubPerm),
cmocka_unit_test(test_bksub),
Expand All @@ -792,5 +792,5 @@ int main(void) {
cmocka_unit_test(test_GaussNewton_Sens_Cal_6Static),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_numMethods, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_quaternion.c
Original file line number Diff line number Diff line change
Expand Up @@ -178,10 +178,10 @@ static void test_quaternionToEuler(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_quaternion[] = {
cmocka_unit_test(test_quaternionNorm), cmocka_unit_test(test_quaternionMult), cmocka_unit_test(test_quaternionRotation),
cmocka_unit_test(test_quaternionConj), cmocka_unit_test(test_quaternionToEuler),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_quaternion, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_queue.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,13 +510,13 @@ static void test_queueDelete(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_queue[] = {
cmocka_unit_test(test_queueInit), cmocka_unit_test(test_queueInitStatic), cmocka_unit_test(test_queuePush),
cmocka_unit_test(test_queuePushFront), cmocka_unit_test(test_queuePushArr), cmocka_unit_test(test_queuePushFrontArr),
cmocka_unit_test(test_queuePop), cmocka_unit_test(test_queuePopBack), cmocka_unit_test(test_queuePopArr),
cmocka_unit_test(test_queuePopBackArr), cmocka_unit_test(test_queuePeek), cmocka_unit_test(test_queuePeekBack),
cmocka_unit_test(test_queuePushPop), cmocka_unit_test(test_queueFlush), cmocka_unit_test(test_queueDelete),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_queue, NULL, NULL);
}
4 changes: 2 additions & 2 deletions tests/test_timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ static void test_timerWrapAround(void** state) {
}

int main(void) {
const struct CMUnitTest tests[] = {
const struct CMUnitTest test_timer[] = {
cmocka_unit_test(test_timerInit), cmocka_unit_test(test_timerStart), cmocka_unit_test(test_timerStop), cmocka_unit_test(test_timerClear),
cmocka_unit_test(test_timerProcess), cmocka_unit_test(test_timerEventExists), cmocka_unit_test(test_timerWrapAround),
};

return cmocka_run_group_tests(tests, NULL, NULL);
return cmocka_run_group_tests(test_timer, NULL, NULL);
}

0 comments on commit aff3a63

Please sign in to comment.