-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Homework 1 #8
base: main
Are you sure you want to change the base?
Homework 1 #8
Conversation
task_01/src/test.cpp
Outdated
#include "utils.hpp" | ||
|
||
TEST(utils, Simple) { | ||
ASSERT_EQ(Task1(9, std::vector < int > {1, 2, 4, 5, 6, 8, 10, 12}), (std::pair < int, int > {1,8})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
форматирование
task_01/src/utils.cpp
Outdated
|
||
std::pair<int, int> Task1(int num, const std::vector<int> arr) { | ||
if (arr.size() < 2) { | ||
throw WrongVector(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай в исключение добавим какую-то информацию (передадим в конструктор строку)
формат упал |
task_01/src/utils.cpp
Outdated
#include <utility> | ||
#include <vector> | ||
|
||
std::pair<int, int> Task1(int num, const std::vector<int> arr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
давай придумаем название по лучше для функции
task_03/src/topology_sort.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
задачи 2-8 должны быть в отдельном ПР
task_01/src/utils.cpp
Outdated
#include <utility> | ||
#include <vector> | ||
|
||
std::pair<int, int> Sum_Of_Elements(int num, const std::vector<int> arr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SumOfElements по кодстайлу
task_03/src/test.cpp
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
решение задач с 2 по 8 нужно унести в дргуой пулл реквест
да, уже переместил, просто изначально начал уже работать по ошибке в этой ветке, поэтому то что, сделал, я не знаю можно ли как-то убрать из этой ветки--Отправлено из мобильной Яндекс Почты30.03.2024, 13:37, "Ivan Khokhlov" ***@***.***>:
@LostPointer requested changes on this pull request.
In task_01/src/utils.cpp:
@@ -0,0 +1,21 @@
+#include "utils.hpp"
+#include <iostream>
+#include <utility>
+#include <vector>
+
+std::pair<int, int> Sum_Of_Elements(int num, const std::vector<int> arr) {
SumOfElements по кодстайлу
On task_03/src/test.cpp:
решение задач с 2 по 8 нужно унести в дргуой пулл реквест
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
No description provided.