Add SWAP for string

This commit is contained in:
Patrick Pelissier committed 2017-03-14 21:31:47 +01:00
1 parent c5bc77b801
commit 29d3439900
2 files changed
+19

No files matched your search

+6
View File
@@ -191,6 +191,12 @@ int main(void)
fclose(f);
assert (string_equal_p(s1, s2));
string_set_str(s1, "AZERTY");
string_set_str(s2, "QWERTY");
string_swap (s1, s2);
assert(string_equal_str_p (s1, "QWERTY"));
assert(string_equal_str_p (s2, "AZERTY"));
string_clear (s1);
exit(0);
}