Skip to content

Conversation

@RomanMokych
Copy link

No description provided.

int IntFromTernaryNumberString(const std::string& ternaryNumberString)
{
return 1;
return ternaryNumberString.front() - '0';
Copy link
Collaborator

Choose a reason for hiding this comment

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

как только ты добавляешь front() или back() сразу стоит задуматься о тесте с пустой строкой :)

return (ternaryNumberString.front() - '0') * 3;
}

return ternaryNumberString.back() - '0';
Copy link
Collaborator

Choose a reason for hiding this comment

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

не совсем понял с чем связано это изменение на этапе красного теста

Copy link
Collaborator

@mettizik mettizik left a comment

Choose a reason for hiding this comment

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

Ты наверное даже немного перестарался с маленькими шагами, std::pow можно было ввести раньше (на этапе рефакторинга теста на 100), это сделало бы переход к циклу более очевидным и ты на том же этапе рефакторинга смог бы его ввести

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