int main() { // test some arbitrary strings char* testStrings[5] = {"abcde", "hello", "apple", "kite", "padle"}; for (int i = 0; i < 5; i++) // print the string followed by whether or not it has all unique characters printf("%s: %s\n", testStrings[i], isUniqueChars(testStrings[i]) ? "true" : "false"); return 0; }
TEST(UniqueCharsTest, Falsecase) { ASSERT_EQ(false, isUniqueChars("aaaaa")); ASSERT_EQ(false, isUniqueChars("bvbbbdsfsafcdsvsa")); }
TEST(UniqueCharsTest, TrueCase) { ASSERT_EQ(true, isUniqueChars("ga")); ASSERT_EQ(true, isUniqueChars("abcdefghijk")); }