summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2023-11-02 15:47:16 +0300
committerdefanor <defanor@uberspace.net>2023-11-02 15:47:16 +0300
commitcafe83109a65b6bfd5bc0f3fd642e0833f5ebc78 (patch)
tree32fdfa39afc5301445db61081d3508c3ebc389eb /tests
parent2a5c3db244708d528f357adeb7e6ec947161fbad (diff)
Use Rust enums for C tagged unions
Used to manually implement tagged unions in Rust as well, but the C representation of Rust enums with fields is supposed to match those.
Diffstat (limited to 'tests')
-rw-r--r--tests/xml_parse_and_print.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/xml_parse_and_print.c b/tests/xml_parse_and_print.c
index ad6bbca..c76b06f 100644
--- a/tests/xml_parse_and_print.c
+++ b/tests/xml_parse_and_print.c
@@ -11,6 +11,7 @@ int main () {
"</foo>";
rexmpp_xml_t *xml = rexmpp_xml_parse (str, strlen(str));
+ printf("Input:\n%s\n\n", str);
if (xml == NULL) {
ret = -1;
} else {
@@ -18,6 +19,7 @@ int main () {
if (str_new == NULL) {
ret = -2;
} else {
+ printf("Output:\n%s\n", str_new);
ret = strcmp(str, str_new);
free(str_new);
}