Rename List_maxLength() -> List_max_length()

main
Hammy 3 years ago
parent 3c7eb952ab
commit b859c41d9f

@ -218,7 +218,7 @@ int List_length(List *list) {
return list->_currentSize + 1; return list->_currentSize + 1;
} }
int List_maxLength(List *list) { int List_max_length(List *list) {
return list->_maxSize; return list->_maxSize;
} }

@ -136,7 +136,7 @@ List *List_slice(List *list, int start_index, int end_index);
int List_length(List *list); int List_length(List *list);
/* /*
* Function: List_maxLength(List *list) * Function: List_max_length(List *list)
* ---------------------------- * ----------------------------
* Return the maxLength (current maximum length allocated in memory) of the given list * Return the maxLength (current maximum length allocated in memory) of the given list
* *
@ -144,7 +144,7 @@ int List_length(List *list);
* *
* returns: int * returns: int
*/ */
int List_maxLength(List *list); int List_max_length(List *list);
/* /*
* Function: List_print(List *list) * Function: List_print(List *list)

@ -97,13 +97,13 @@ void shouldReturnListMaxLengthTwenty() {
List_append(list, 9); List_append(list, 9);
// Mid-Assert // Mid-Assert
assert(List_maxLength(list) == 10); assert(List_max_length(list) == 10);
// Act // Act
List_append(list, 10); List_append(list, 10);
// Assert // Assert
assert(List_maxLength(list) == 20); assert(List_max_length(list) == 20);
List_destroy(&list); List_destroy(&list);
printSuccess(__func__); printSuccess(__func__);
@ -123,7 +123,7 @@ void shouldCopyPopulatedList() {
// Assert // Assert
assert(List_length(copiedList) == List_length(list)); assert(List_length(copiedList) == List_length(list));
assert(List_maxLength(copiedList) == List_maxLength(list)); assert(List_max_length(copiedList) == List_max_length(list));
for (int i = 0; i < List_length(copiedList); i++) { for (int i = 0; i < List_length(copiedList); i++) {
assert(List_get(list, i) == List_get(copiedList, i)); assert(List_get(list, i) == List_get(copiedList, i));
} }
@ -157,7 +157,7 @@ void shouldCopyEmptyList() {
// Assert // Assert
assert(List_length(copiedList) == 0); assert(List_length(copiedList) == 0);
assert(List_maxLength(copiedList) == 10); assert(List_max_length(copiedList) == 10);
List_destroy(&list); List_destroy(&list);
List_destroy(&copiedList); List_destroy(&copiedList);

Loading…
Cancel
Save