-
Notifications
You must be signed in to change notification settings - Fork 16
01-Leap Year #20
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
base: master
Are you sure you want to change the base?
01-Leap Year #20
Conversation
mettizik
left a comment
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.
Всё отлично, немного не хватило рефакторинга в конце (это опционально в данном случае - на вкус и цвет), но обилие if'ов и return'ов усложняет функцию для сопровождения. От последнего ифа можно было спокойно избавиться переместив его условие в ретурн:
return isDivisable(year, 4);
| { | ||
| EXPECT_TRUE(IsLeapYear(g_fourHundred)); | ||
| EXPECT_TRUE(IsLeapYear(g_fourHundred * 2)); | ||
| EXPECT_TRUE(IsLeapYear(g_fourHundred * 3)); |
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.
Отличное дополнение теста 👍 (но название немного портит картину ))
| } | ||
|
|
||
| TEST(LeapYear, Test400) | ||
| TEST(LeapYear, TestDivisible400) |
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.
не хватает непосредственно ожидания - понятно, что он проверяет кратность 400, но непонятно что должно стать с таким числом - каково ожидаемое поведение
03 - Bank OCR
04 - Fake Weather Client
No description provided.