D | str_tester.c | 65 char one[50]; variable 123 for (__n = 0; __n < (int) sizeof (one); ++__n) \ 124 one[__n] = 'Z'; \ 125 fn (one, str); \ 126 for (cp = one, __n = 0; __n < n; ++__n, ++cp) \ 136 check (strcpy (one, "abcd") == one, 1); /* Returned value. */ in test_strcpy() 137 equal (one, "abcd", 2); /* Basic test. */ in test_strcpy() 139 (void) strcpy (one, "x"); in test_strcpy() 140 equal (one, "x", 3); /* Writeover. */ in test_strcpy() 141 equal (one+2, "cd", 4); /* Wrote too much? */ in test_strcpy() [all …]
|