summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBert Vermeulen <bert@biot.com>2014-06-26 19:56:02 +0200
committerBert Vermeulen <bert@biot.com>2014-06-26 20:02:44 +0200
commit5f22c187f99ea13e0a1a5c8c995e73a75f93a9b1 (patch)
treee1c06db2c21cadefaa6381a34c69080e8ad5aee5 /tests
parent604eece9928adbf4fb6b85470ceadeca1b73fabb (diff)
downloadlibsigrokdecode-5f22c187f99ea13e0a1a5c8c995e73a75f93a9b1.tar.gz
libsigrokdecode-5f22c187f99ea13e0a1a5c8c995e73a75f93a9b1.zip
runtc: PD option value is a GVariant, not string.
This is still broken: it needs to properly check the expected type of the option, not just blindly assume G_VARIANT_TYPE_STRING.
Diffstat (limited to 'tests')
-rw-r--r--tests/runtc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/runtc.c b/tests/runtc.c
index e376070..ab55139 100644
--- a/tests/runtc.c
+++ b/tests/runtc.c
@@ -48,7 +48,7 @@ struct channel {
struct option {
char *key;
- char *value;
+ GVariant *value;
};
struct pd {
@@ -736,7 +736,8 @@ int main(int argc, char **argv)
} else {
option = malloc(sizeof(struct option));
option->key = g_strdup(kv[0]);
- option->value = g_strdup(kv[1]);
+ option->value = g_variant_new_string(kv[1]);
+ g_variant_ref_sink(option->value);
/* Apply to last PD. */
pd->options = g_slist_append(pd->options, option);
}