The fact that you're resetting hostname and port after each test, and each test has the same form, strongly suggests this could all be made nicer with
```
void run_test(const char *text, const char *host, const char *port)
{
      size_t len = strlen(text) + 1;
      char copy[len], *h = NULL, *p = NULL;
      strcpy(copy, text);
      ParseHostPort(copy, &h, &p);
      assert_string_equal(h, host);
      assert_string_equal(p, port);
}
```
and then reduce each test to a simple call to that.