-
Notifications
You must be signed in to change notification settings - Fork 17
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
first home task #4
base: master
Are you sure you want to change the base?
Conversation
Green Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
} | ||
return 0; | ||
return -1; |
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.
нет теста, покрывающего эту строку
@@ -19,13 +19,26 @@ If your language provides a method in the standard library to perform the conver | |||
|
|||
#include <gtest/gtest.h> | |||
|
|||
int DemicalView(std::string str) |
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.
На этом шаге выполнялся рефакторинг или написание кода?
int answer = 0; | ||
answer += OneSignDemicalView(str.substr(str.size() - 1 , 1)); | ||
|
||
return (answer > 0)? answer : 0; |
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.
нет теста, проверяющего поведение при answer <= 0
@@ -68,3 +68,9 @@ TEST(TernaryNumbers, TwoSignString11) | |||
{ | |||
ASSERT_EQ(4, DemicalView("11")); | |||
} | |||
|
|||
|
|||
TEST(TernaryNumbers, SpecifcationTest) |
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.
В спецификации есть еще ожидаемое поведение при воде невалидной строки. На это нет тестов.
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
Signed-off-by: PotapovAlexandr <alexpotapov1985@gmail.com>
Signed-off-by: PotapovAlexandr <alexpotapov1985@gmail.com>
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
Signed-off-by: Alexander Potapov <potapov.alexander@dev.local>
No description provided.