trick/trick_source/trick_utils/trick_adt/test
jmpenn 1d0e324c6f
Fix a variety of bugs found in dllist.c while addressing Issue #1559. (#1577)
* Fix a variety of bugs found in dllist.c while addressing Issue #1559.

* Added More descriptive error messages.
* Wrote google-test based unit tests for the DLL List library.
* Deleted old, incomplete test program.
* Added new function DLL_ListContainsPos which determines whether the given list contains the node at the given pos.
* DLLFind bug: Added check to determine whether a compare function has been specified, and emit an error message if it hasn’t.
* DLL_FindIndex bug: Corrected bounds checking.
* DLL_GetAt bug: Added check to ensure that the specified pos is actually in the given list.
* DLL_SetAt bug: Added check to ensure that the specified pos is actually in the given list.
* DLL_RemoveAt: corrected logic mistake in NULL ptr check. Added check to ensure that the specified pos is actually in the given list.
* DLL_InsertBefore bug: element count not correctly updated.
* DLL_InsertAfter: next and prev ptrs not correctly updated, which corrupted the list.
* DLL_GetNext bug: logic error in NULL ptr checks. Added check to ensure that the specified pos is actually in the given list.
* DLL_GetPrev bug: logic error in NULL ptr checks. Added check to ensure that the specified pos is actually in the given list.
* DLL_AddHead: Fixed NULL check logic error.
* DLL_AddTail: Fixed NULL check logic error.

* Address review comments, remove extraneous make target.

* Change false to 0 in dllist.c
2023-10-05 13:33:38 -05:00
..
dllist_unittest.cpp Fix a variety of bugs found in dllist.c while addressing Issue #1559. (#1577) 2023-10-05 13:33:38 -05:00
Makefile Fix a variety of bugs found in dllist.c while addressing Issue #1559. (#1577) 2023-10-05 13:33:38 -05:00