|
|
|
|
@@ -1,3 +1,4 @@
|
|
|
|
|
#include "glib.h"
|
|
|
|
|
#include "prof_cmocka.h"
|
|
|
|
|
#include "common.h"
|
|
|
|
|
#include "ai/ai_client.h"
|
|
|
|
|
@@ -703,7 +704,6 @@ test_ai_parse_models_openai_format(void** state)
|
|
|
|
|
models = g_list_next(models);
|
|
|
|
|
assert_string_equal("google/gemini-3-flash-preview", models->data);
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -776,7 +776,6 @@ test_ai_parse_models_perplexity_format(void** state)
|
|
|
|
|
models = g_list_last(models);
|
|
|
|
|
assert_string_equal("xai/grok-4.3", models->data);
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -801,7 +800,6 @@ test_ai_parse_models_array_format(void** state)
|
|
|
|
|
models = g_list_next(models);
|
|
|
|
|
assert_string_equal("model3", models->data);
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -821,7 +819,6 @@ test_ai_parse_models_empty_json(void** state)
|
|
|
|
|
assert_null(provider->models);
|
|
|
|
|
assert_int_equal(0, g_list_length(provider->models));
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -837,7 +834,6 @@ test_ai_parse_models_null_handling(void** state)
|
|
|
|
|
ai_parse_models_from_json(provider, NULL);
|
|
|
|
|
assert_null(provider->models);
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -861,7 +857,6 @@ test_ai_parse_models_escaped_quotes(void** state)
|
|
|
|
|
GList* models = provider->models;
|
|
|
|
|
assert_non_null(models);
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -885,7 +880,6 @@ test_ai_parse_models_with_whitespace(void** state)
|
|
|
|
|
GList* models = provider->models;
|
|
|
|
|
assert_string_equal("model-with-spaces", models->data);
|
|
|
|
|
|
|
|
|
|
ai_provider_unref(provider);
|
|
|
|
|
ai_client_shutdown();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1142,7 +1136,7 @@ test_ai_providers_find_cycles_through_many(void** state)
|
|
|
|
|
ai_add_provider("alpine", "https://al.example/");
|
|
|
|
|
|
|
|
|
|
/* Three providers share prefix "alp": alpha, alphabet, alpine. */
|
|
|
|
|
GHashTable* seen = g_hash_table_new(g_str_hash, g_str_equal);
|
|
|
|
|
GHashTable* seen = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, NULL);
|
|
|
|
|
|
|
|
|
|
for (int i = 0; i < 3; i++) {
|
|
|
|
|
auto_gchar gchar* match = ai_providers_find("alp", FALSE, NULL);
|
|
|
|
|
|