예제 #1
0
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;
}
예제 #2
0
파일: test.cpp 프로젝트: njir/codeforces
TEST(UniqueCharsTest, Falsecase) { 
    ASSERT_EQ(false, isUniqueChars("aaaaa"));
    ASSERT_EQ(false, isUniqueChars("bvbbbdsfsafcdsvsa"));
}
예제 #3
0
파일: test.cpp 프로젝트: njir/codeforces
TEST(UniqueCharsTest, TrueCase) { 
    ASSERT_EQ(true, isUniqueChars("ga"));
    ASSERT_EQ(true, isUniqueChars("abcdefghijk"));
}