From b859c41d9f70471abe3b415d6be239696be1c8c5 Mon Sep 17 00:00:00 2001 From: Hammy Date: Mon, 27 Dec 2021 03:33:34 +0000 Subject: [PATCH] Rename List_maxLength() -> List_max_length() --- src/list.c | 2 +- src/list.h | 4 ++-- src/test/test.c | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/list.c b/src/list.c index e2297c7..f9637bd 100644 --- a/src/list.c +++ b/src/list.c @@ -218,7 +218,7 @@ int List_length(List *list) { return list->_currentSize + 1; } -int List_maxLength(List *list) { +int List_max_length(List *list) { return list->_maxSize; } diff --git a/src/list.h b/src/list.h index 23ec8ac..a6233d0 100644 --- a/src/list.h +++ b/src/list.h @@ -136,7 +136,7 @@ List *List_slice(List *list, int start_index, int end_index); 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 * @@ -144,7 +144,7 @@ int List_length(List *list); * * returns: int */ -int List_maxLength(List *list); +int List_max_length(List *list); /* * Function: List_print(List *list) diff --git a/src/test/test.c b/src/test/test.c index 4e5fe4b..93e0909 100644 --- a/src/test/test.c +++ b/src/test/test.c @@ -97,13 +97,13 @@ void shouldReturnListMaxLengthTwenty() { List_append(list, 9); // Mid-Assert - assert(List_maxLength(list) == 10); + assert(List_max_length(list) == 10); // Act List_append(list, 10); // Assert - assert(List_maxLength(list) == 20); + assert(List_max_length(list) == 20); List_destroy(&list); printSuccess(__func__); @@ -123,7 +123,7 @@ void shouldCopyPopulatedList() { // Assert 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++) { assert(List_get(list, i) == List_get(copiedList, i)); } @@ -157,7 +157,7 @@ void shouldCopyEmptyList() { // Assert assert(List_length(copiedList) == 0); - assert(List_maxLength(copiedList) == 10); + assert(List_max_length(copiedList) == 10); List_destroy(&list); List_destroy(&copiedList);