Skip to content
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tdd_intro/homework/02_ternary_numbers/test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ If your language provides a method in the standard library to perform the conver

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() сразу стоит задуматься о тесте с пустой строкой :)

}

TEST(IntFromTernaryNumberString, one)
Expand Down