diff options
author | David Robillard <d@drobilla.net> | 2012-04-06 20:25:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-06 20:25:00 +0000 |
commit | 3e790252a8285d85ad2aaccf3bd575867385ba29 (patch) | |
tree | 4aec3f5c0189b6508443a7b242473df0391c336d /test/test_plugin.c | |
parent | ea3e8d43b7608bbe253179ba84c3656c1a2769b5 (diff) | |
download | lilv-3e790252a8285d85ad2aaccf3bd575867385ba29.tar.gz lilv-3e790252a8285d85ad2aaccf3bd575867385ba29.tar.bz2 lilv-3e790252a8285d85ad2aaccf3bd575867385ba29.zip |
Update test suite for latest state extension.
git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4148 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'test/test_plugin.c')
-rw-r--r-- | test/test_plugin.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/test/test_plugin.c b/test/test_plugin.c index 5a960b2..cddb0c4 100644 --- a/test/test_plugin.c +++ b/test/test_plugin.c @@ -153,7 +153,7 @@ map_uri(Test* plugin, const char* uri) return plugin->map->map(plugin->map->handle, uri); } -static void +static LV2_State_Status save(LV2_Handle instance, LV2_State_Store_Function store, void* callback_data, @@ -280,9 +280,11 @@ save(LV2_Handle instance, free(spath); } } + + return LV2_STATE_SUCCESS; } -static void +static LV2_State_Status restore(LV2_Handle instance, LV2_State_Retrieve_Function retrieve, void* callback_data, @@ -308,7 +310,7 @@ restore(LV2_Handle instance, &size, &type, &valflags); if (!map_path) { - return; + return LV2_STATE_ERR_NO_FEATURE; } char* apath = (char*)retrieve( @@ -345,13 +347,15 @@ restore(LV2_Handle instance, } else { fprintf(stderr, "error: Failed to restore save file.\n"); } + + return LV2_STATE_SUCCESS; } const void* extension_data(const char* uri) { static const LV2_State_Interface state = { save, restore }; - if (!strcmp(uri, LV2_STATE__Interface)) { + if (!strcmp(uri, LV2_STATE__interface)) { return &state; } return NULL; |