From 3e790252a8285d85ad2aaccf3bd575867385ba29 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 6 Apr 2012 20:25:00 +0000 Subject: Update test suite for latest state extension. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@4148 a436a847-0d15-0410-975c-d299462d15a1 --- test/test_plugin.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'test/test_plugin.c') 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; -- cgit v1.2.1