Skip to content
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

Open
wants to merge 26 commits into
base: main
Choose a base branch
from
Open

Conversation

Matvey-cmd
Copy link
Contributor

No description provided.

#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}));
Copy link
Contributor

Choose a reason for hiding this comment

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

форматирование

task_01/src/test.cpp Show resolved Hide resolved

std::pair<int, int> Task1(int num, const std::vector<int> arr) {
if (arr.size() < 2) {
throw WrongVector("");
Copy link
Contributor

Choose a reason for hiding this comment

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

давай в исключение добавим какую-то информацию (передадим в конструктор строку)

task_01/src/utils.hpp Show resolved Hide resolved
task_01/src/utils.cpp Outdated Show resolved Hide resolved
@LostPointer
Copy link
Contributor

формат упал

#include <utility>
#include <vector>

std::pair<int, int> Task1(int num, const std::vector<int> arr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

давай придумаем название по лучше для функции

Copy link
Contributor

Choose a reason for hiding this comment

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

задачи 2-8 должны быть в отдельном ПР

#include <utility>
#include <vector>

std::pair<int, int> Sum_Of_Elements(int num, const std::vector<int> arr) {
Copy link
Contributor

Choose a reason for hiding this comment

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

SumOfElements по кодстайлу

Copy link
Contributor

Choose a reason for hiding this comment

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

решение задач с 2 по 8 нужно унести в дргуой пулл реквест

@Matvey-cmd
Copy link
Contributor Author

Matvey-cmd commented Mar 30, 2024 via email

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