diff options
author | David Robillard <d@drobilla.net> | 2024-10-06 14:38:19 -0400 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2024-10-11 14:10:27 -0400 |
commit | 0a2de34d4fdcedf87e101a309aaa180fcdf18fcc (patch) | |
tree | 3932ab3a3ccea5b5dd56527afe5f046a83cc3f8c /test | |
parent | a07a8818f22bfa6b467093f1efd287e86983fdf1 (diff) | |
download | lilv-0a2de34d4fdcedf87e101a309aaa180fcdf18fcc.tar.gz lilv-0a2de34d4fdcedf87e101a309aaa180fcdf18fcc.tar.bz2 lilv-0a2de34d4fdcedf87e101a309aaa180fcdf18fcc.zip |
Add missing const qualifiers
Diffstat (limited to 'test')
-rw-r--r-- | test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c | 2 | ||||
-rw-r--r-- | test/missing_descriptor.lv2/test_missing_descriptor.c | 2 | ||||
-rw-r--r-- | test/missing_plugin.lv2/test_missing_plugin.c | 2 | ||||
-rw-r--r-- | test/test_bad_port_index.c | 4 | ||||
-rw-r--r-- | test/test_bad_port_symbol.c | 4 | ||||
-rw-r--r-- | test/test_discovery.c | 4 | ||||
-rw-r--r-- | test/test_no_author.c | 10 | ||||
-rw-r--r-- | test/test_no_verify.c | 4 | ||||
-rw-r--r-- | test/test_plugin.c | 4 | ||||
-rw-r--r-- | test/test_port.c | 4 | ||||
-rw-r--r-- | test/test_project.c | 4 | ||||
-rw-r--r-- | test/test_project_no_author.c | 10 | ||||
-rw-r--r-- | test/test_prototype.c | 4 | ||||
-rw-r--r-- | test/test_state.c | 10 | ||||
-rw-r--r-- | test/test_value.c | 2 | ||||
-rw-r--r-- | test/test_verify.c | 4 | ||||
-rw-r--r-- | test/test_world.c | 2 |
17 files changed, 38 insertions, 38 deletions
diff --git a/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c b/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c index 9a9641b..f4fb879 100644 --- a/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c +++ b/test/failed_lib_descriptor.lv2/test_failed_lib_descriptor.c @@ -31,7 +31,7 @@ main(int argc, char** argv) const LilvPlugin* plugin = lilv_plugins_get_by_uri(plugins, plugin_uri); assert(plugin); - LilvInstance* instance = lilv_plugin_instantiate(plugin, 48000.0, NULL); + const LilvInstance* instance = lilv_plugin_instantiate(plugin, 48000.0, NULL); assert(!instance); lilv_node_free(plugin_uri); diff --git a/test/missing_descriptor.lv2/test_missing_descriptor.c b/test/missing_descriptor.lv2/test_missing_descriptor.c index b737048..c76779d 100644 --- a/test/missing_descriptor.lv2/test_missing_descriptor.c +++ b/test/missing_descriptor.lv2/test_missing_descriptor.c @@ -31,7 +31,7 @@ main(int argc, char** argv) const LilvPlugin* plugin = lilv_plugins_get_by_uri(plugins, plugin_uri); assert(plugin); - LilvInstance* instance = lilv_plugin_instantiate(plugin, 48000.0, NULL); + const LilvInstance* instance = lilv_plugin_instantiate(plugin, 48000.0, NULL); assert(!instance); lilv_node_free(plugin_uri); diff --git a/test/missing_plugin.lv2/test_missing_plugin.c b/test/missing_plugin.lv2/test_missing_plugin.c index 6eb1705..dfa9158 100644 --- a/test/missing_plugin.lv2/test_missing_plugin.c +++ b/test/missing_plugin.lv2/test_missing_plugin.c @@ -31,7 +31,7 @@ main(int argc, char** argv) const LilvPlugin* plugin = lilv_plugins_get_by_uri(plugins, plugin_uri); assert(plugin); - LilvInstance* instance = lilv_plugin_instantiate(plugin, 48000.0, NULL); + const LilvInstance* instance = lilv_plugin_instantiate(plugin, 48000.0, NULL); assert(!instance); lilv_node_free(plugin_uri); diff --git a/test/test_bad_port_index.c b/test/test_bad_port_index.c index 99bdfc6..c8eeb21 100644 --- a/test/test_bad_port_index.c +++ b/test/test_bad_port_index.c @@ -25,8 +25,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle( env, "bad_port_index.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { diff --git a/test/test_bad_port_symbol.c b/test/test_bad_port_symbol.c index 2422e15..31fe1c6 100644 --- a/test/test_bad_port_symbol.c +++ b/test/test_bad_port_symbol.c @@ -25,8 +25,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle( env, "bad_port_symbol.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { diff --git a/test/test_discovery.c b/test/test_discovery.c index 7d38207..35cdef6 100644 --- a/test/test_discovery.c +++ b/test/test_discovery.c @@ -43,8 +43,8 @@ discovery_verify_plugin(const LilvTestEnv* env, const LilvPlugin* plugin) int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle(env, "discovery.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { return 1; diff --git a/test/test_no_author.c b/test/test_no_author.c index 396ae9e..1a2b8dd 100644 --- a/test/test_no_author.c +++ b/test/test_no_author.c @@ -47,8 +47,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle(env, "no_author.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { return 1; @@ -61,13 +61,13 @@ main(void) const LilvPlugin* plug = lilv_plugins_get_by_uri(plugins, env->plugin1_uri); assert(plug); - LilvNode* author_name = lilv_plugin_get_author_name(plug); + const LilvNode* author_name = lilv_plugin_get_author_name(plug); assert(!author_name); - LilvNode* author_email = lilv_plugin_get_author_email(plug); + const LilvNode* author_email = lilv_plugin_get_author_email(plug); assert(!author_email); - LilvNode* author_homepage = lilv_plugin_get_author_homepage(plug); + const LilvNode* author_homepage = lilv_plugin_get_author_homepage(plug); assert(!author_homepage); delete_bundle(env); diff --git a/test/test_no_verify.c b/test/test_no_verify.c index 66f81e9..7d28314 100644 --- a/test/test_no_verify.c +++ b/test/test_no_verify.c @@ -14,8 +14,8 @@ static const char* const plugin_ttl = ":plug a lv2:Plugin .\n"; int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle(env, "no_verify.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { return 1; diff --git a/test/test_plugin.c b/test/test_plugin.c index e2b9b53..32e356b 100644 --- a/test/test_plugin.c +++ b/test/test_plugin.c @@ -101,7 +101,7 @@ main(void) const LilvNodes* data_uris = lilv_plugin_get_data_uris(plug); assert(lilv_nodes_size(data_uris) == 2); - LilvNode* project = lilv_plugin_get_project(plug); + const LilvNode* project = lilv_plugin_get_project(plug); assert(!project); char* manifest_uri = @@ -218,7 +218,7 @@ main(void) LilvNode* blank_p = lilv_new_uri(world, "http://example.org/blank"); LilvNodes* blanks = lilv_plugin_get_value(plug, blank_p); assert(lilv_nodes_size(blanks) == 1); - LilvNode* blank = lilv_nodes_get_first(blanks); + const LilvNode* blank = lilv_nodes_get_first(blanks); assert(lilv_node_is_blank(blank)); const char* blank_str = lilv_node_as_blank(blank); char* blank_tok = lilv_node_get_turtle_token(blank); diff --git a/test/test_port.c b/test/test_port.c index e05dcde..5991189 100644 --- a/test/test_port.c +++ b/test/test_port.c @@ -92,8 +92,8 @@ main(void) lilv_node_free(nopsym); // Try getting an invalid property - LilvNode* num = lilv_new_int(world, 1); - LilvNodes* nothing = lilv_port_get_value(plug, p, num); + LilvNode* num = lilv_new_int(world, 1); + const LilvNodes* nothing = lilv_port_get_value(plug, p, num); assert(!nothing); lilv_node_free(num); diff --git a/test/test_project.c b/test/test_project.c index cfce35a..d37d9a1 100644 --- a/test/test_project.c +++ b/test/test_project.c @@ -53,8 +53,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle(env, "project.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { return 1; diff --git a/test/test_project_no_author.c b/test/test_project_no_author.c index 5b0e57d..3426e72 100644 --- a/test/test_project_no_author.c +++ b/test/test_project_no_author.c @@ -47,8 +47,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle( env, "project_no_author.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { @@ -62,13 +62,13 @@ main(void) const LilvPlugin* plug = lilv_plugins_get_by_uri(plugins, env->plugin1_uri); assert(plug); - LilvNode* author_name = lilv_plugin_get_author_name(plug); + const LilvNode* author_name = lilv_plugin_get_author_name(plug); assert(!author_name); - LilvNode* author_email = lilv_plugin_get_author_email(plug); + const LilvNode* author_email = lilv_plugin_get_author_email(plug); assert(!author_email); - LilvNode* author_homepage = lilv_plugin_get_author_homepage(plug); + const LilvNode* author_homepage = lilv_plugin_get_author_homepage(plug); assert(!author_homepage); delete_bundle(env); diff --git a/test/test_prototype.c b/test/test_prototype.c index 4e17a63..8ffd6e4 100644 --- a/test/test_prototype.c +++ b/test/test_prototype.c @@ -60,8 +60,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle(env, "prototype.lv2", manifest_ttl, plugin_ttl)) { return 1; diff --git a/test/test_state.c b/test/test_state.c index 67325d2..bc310eb 100644 --- a/test/test_state.c +++ b/test/test_state.c @@ -235,7 +235,7 @@ set_port_value(const char* port_symbol, static char* make_scratch_path(LV2_State_Make_Path_Handle handle, const char* path) { - TestDirectories* dirs = (TestDirectories*)handle; + const TestDirectories* dirs = (TestDirectories*)handle; return zix_path_join(NULL, dirs->scratch, path); } @@ -1010,12 +1010,12 @@ test_bad_subject(void) TestContext* const ctx = test_context_new(); LilvNode* const string = lilv_new_string(ctx->env->world, "Not a URI"); - LilvState* const file_state = lilv_state_new_from_file( + const LilvState* const file_state = lilv_state_new_from_file( ctx->env->world, &ctx->map, string, "/I/do/not/matter"); assert(!file_state); - LilvState* const world_state = + const LilvState* const world_state = lilv_state_new_from_world(ctx->env->world, &ctx->map, string); assert(!world_state); @@ -1027,8 +1027,8 @@ test_bad_subject(void) static void test_missing_path(void) { - TestContext* const ctx = test_context_new(); - LilvState* const state = lilv_state_new_from_file( + TestContext* const ctx = test_context_new(); + const LilvState* const state = lilv_state_new_from_file( ctx->env->world, &ctx->map, NULL, "/does/not/exist"); assert(!state); diff --git a/test/test_value.c b/test/test_value.c index a37c886..3314701 100644 --- a/test/test_value.c +++ b/test/test_value.c @@ -133,7 +133,7 @@ main(void) assert(!lilv_node_equals(ival, ifval)); lilv_node_free(ifval); - LilvNode* nil = NULL; + const LilvNode* nil = NULL; assert(!lilv_node_equals(uval, nil)); assert(!lilv_node_equals(nil, uval)); assert(lilv_node_equals(nil, nil)); diff --git a/test/test_verify.c b/test/test_verify.c index e066751..3a2031b 100644 --- a/test/test_verify.c +++ b/test/test_verify.c @@ -23,8 +23,8 @@ static const char* const plugin_ttl = "\ int main(void) { - LilvTestEnv* const env = lilv_test_env_new(); - LilvWorld* const world = env->world; + LilvTestEnv* const env = lilv_test_env_new(); + const LilvWorld* const world = env->world; if (create_bundle(env, "verify.lv2", SIMPLE_MANIFEST_TTL, plugin_ttl)) { return 1; diff --git a/test/test_world.c b/test/test_world.c index fda8595..269e95f 100644 --- a/test/test_world.c +++ b/test/test_world.c @@ -19,7 +19,7 @@ main(void) LilvNode* num = lilv_new_int(env->world, 4); LilvNode* uri = lilv_new_uri(env->world, "http://example.org/object"); - LilvNodes* matches = lilv_world_find_nodes(world, num, NULL, NULL); + const LilvNodes* matches = lilv_world_find_nodes(world, num, NULL, NULL); assert(!matches); matches = lilv_world_find_nodes(world, NULL, num, NULL); |