void test_null_string_normal(void){
	char* testString = calloc(sizeof(char),4);
        testString = concat( "foo", testString);
        char* desired = calloc(sizeof(char),4);
	nullString(testString);
	CU_ASSERT_TRUE(memcmp(testString, desired,4)==0);
}
Exemple #2
0
void fixNULLfields(std::string &line) {
    std::string nullString("'NULL'");
    size_t pos = line.find(nullString);
    while (pos != std::string::npos) {
        line.replace(pos, nullString.length(), "NULL");
        pos = line.find(nullString);
    }
}
void test_null_string_nullpointer(void){
	char* testString = NULL;
        
	nullString(testString);
	CU_ASSERT_EQUAL(testString, NULL);
}