Skip to content

Test sorted list#10

Open
stuffacc wants to merge 4 commits intomasterfrom
test_sorted_list
Open

Test sorted list#10
stuffacc wants to merge 4 commits intomasterfrom
test_sorted_list

Conversation

@stuffacc
Copy link
Owner

No description provided.

@stuffacc stuffacc requested a review from chernishev November 22, 2025 11:38
Comment on lines 83 to 87
switch (inp) {
case '1':
printf("Добавить: ");
scanf("%d", &value);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

По стайлгайду switch форматируется не так. И отступы должны быть в 4 пробела.

Comment on lines 44 to 61
void testAddValue(List* list, int value, int except) {
addValue(list, value);

if (except != (*list).size) {
printf("Тест не пройден\n");
exit(-1);
}
printList(list);
}

void testRemoveValue(List* list, int value, int except) {
removeValue(list, value);
if (except != (*list).size) {
printf("Тест не пройден\n");
exit(-1);
}
printList(list);
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Эти тесты практически ничего не проверяют. У Вас в курсе по питону была тема "тестирование", и там рассказывалось, что такое юнит-тесты, и какими свойствами они должны обладать. Также можете посмотреть решения Ваших одногруппников.

6/sorted_list.c Outdated


void initList(List* list) {
(*list).head = NULL;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Для обращения к полям структуры по указателю используется другой оператор.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants