Open
Conversation
p-senichenkov
suggested changes
Dec 1, 2025
6/main_sorted_list.c
Outdated
Comment on lines
83
to
87
| switch (inp) { | ||
| case '1': | ||
| printf("Добавить: "); | ||
| scanf("%d", &value); | ||
|
|
There was a problem hiding this comment.
По стайлгайду switch форматируется не так. И отступы должны быть в 4 пробела.
6/main_sorted_list.c
Outdated
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); | ||
| } |
There was a problem hiding this comment.
Эти тесты практически ничего не проверяют. У Вас в курсе по питону была тема "тестирование", и там рассказывалось, что такое юнит-тесты, и какими свойствами они должны обладать. Также можете посмотреть решения Ваших одногруппников.
6/sorted_list.c
Outdated
|
|
||
|
|
||
| void initList(List* list) { | ||
| (*list).head = NULL; |
There was a problem hiding this comment.
Для обращения к полям структуры по указателю используется другой оператор.
added 2 commits
December 25, 2025 14:16
p-senichenkov
approved these changes
Dec 25, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.