Formats a countable noun. Depending on its quantity, either the singular form or the plural form is used. e.g. FormatCountableNoun(1, "formula", "formuli") returns "1 formula". FormatCountableNoun(5, "book", "books") returns "5 books".
| 4247 | // FormatCountableNoun(1, "formula", "formuli") returns "1 formula". |
| 4248 | // FormatCountableNoun(5, "book", "books") returns "5 books". |
| 4249 | static std::string FormatCountableNoun(int count, |
| 4250 | const char * singular_form, |
| 4251 | const char * plural_form) { |
| 4252 | return internal::StreamableToString(count) + " " + |
| 4253 | (count == 1 ? singular_form : plural_form); |
| 4254 | } |
| 4255 | |
| 4256 | // Formats the count of tests. |
| 4257 | static std::string FormatTestCount(int test_count) { |
no test coverage detected