diff --git a/tests/Makefile b/tests/Makefile index 534de4f..0d7952f 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -7,13 +7,11 @@ UNITY_LIB = ../build/libunity.a SQLITE_LIB = ../build/libsqlite3.a GRAPH_LIB = ../build/libgraph_static.a -LDFLAGS = -lm -ldl -lpthread +LDFLAGS = -lm -ldl -lpthread -Wl,--export-dynamic -# Basic tests that need to be fixed -BASIC_TESTS = test_loading test_insert_nodes test_query_nodes -EXTENDED_TESTS = test_clauses_create test_clauses_delete test_clauses_match test_clauses_return test_clauses_where -EXTENDED_TESTS += test_concurrency test_cypher_functions test_cypher_queries test_error_handling -EXTENDED_TESTS += test_graph_algorithms test_performance test_real_cypher_syntax test_storage test_transactions +# Basic tests - only include tests that actually exist +BASIC_TESTS = test_match_return_simple test_storage test_virtual_table_crud test_performance +EXTENDED_TESTS = # None exist yet ALL_TESTS = $(BASIC_TESTS) $(EXTENDED_TESTS) diff --git a/tests/debug_backing_tables.c b/tests/debug_backing_tables.c index fbab26f..83fb704 100644 --- a/tests/debug_backing_tables.c +++ b/tests/debug_backing_tables.c @@ -14,7 +14,7 @@ int main(void) { sqlite3_enable_load_extension(db, 1); // Load graph extension - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); printf("2. Load extension: %s\n", rc == SQLITE_OK ? "OK" : (error_msg ? error_msg : "Unknown error")); if (error_msg) { sqlite3_free(error_msg); diff --git a/tests/debug_create_test.c b/tests/debug_create_test.c index b1ecd80..2657bf7 100644 --- a/tests/debug_create_test.c +++ b/tests/debug_create_test.c @@ -15,7 +15,7 @@ void debug_create_test(void) { sqlite3_enable_load_extension(db, 1); // Load graph extension - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); printf("2. Load extension: %s\n", rc == SQLITE_OK ? "OK" : (error_msg ? error_msg : "Unknown error")); if (error_msg) { sqlite3_free(error_msg); diff --git a/tests/debug_table_schema.c b/tests/debug_table_schema.c index a178d1c..508f3b0 100644 --- a/tests/debug_table_schema.c +++ b/tests/debug_table_schema.c @@ -10,7 +10,7 @@ int main(void) { int rc = sqlite3_open(":memory:", &db); sqlite3_enable_load_extension(db, 1); - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); if (rc != SQLITE_OK) { printf("Load extension failed: %s\n", error_msg); return 1; diff --git a/tests/generate_tck_tests.py b/tests/generate_tck_tests.py index 704fabd..2ae4d20 100644 --- a/tests/generate_tck_tests.py +++ b/tests/generate_tck_tests.py @@ -63,7 +63,7 @@ def generate_test_file_header(): sqlite3_enable_load_extension(db, 1); // Load graph extension - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\\n", error_msg); sqlite3_free(error_msg); diff --git a/tests/implement_working_insert_scenarios.py b/tests/implement_working_insert_scenarios.py index d0d98bd..0abe36b 100644 --- a/tests/implement_working_insert_scenarios.py +++ b/tests/implement_working_insert_scenarios.py @@ -24,7 +24,7 @@ rc = sqlite3_enable_load_extension(db, 1); TEST_ASSERT_EQUAL(SQLITE_OK, rc); - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", NULL); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", NULL); TEST_ASSERT_EQUAL(SQLITE_OK, rc); // Create backing tables diff --git a/tests/tck_test_clauses_call.c b/tests/tck_test_clauses_call.c index 8ea5450..b71b589 100644 --- a/tests/tck_test_clauses_call.c +++ b/tests/tck_test_clauses_call.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_create.c b/tests/tck_test_clauses_create.c index d2fb1ca..541ad38 100644 --- a/tests/tck_test_clauses_create.c +++ b/tests/tck_test_clauses_create.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_delete.c b/tests/tck_test_clauses_delete.c index dd41316..209cf57 100644 --- a/tests/tck_test_clauses_delete.c +++ b/tests/tck_test_clauses_delete.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_match_where.c b/tests/tck_test_clauses_match_where.c index 9f9c9c5..64a4941 100644 --- a/tests/tck_test_clauses_match_where.c +++ b/tests/tck_test_clauses_match_where.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_merge.c b/tests/tck_test_clauses_merge.c index ea49ae7..ae30d67 100644 --- a/tests/tck_test_clauses_merge.c +++ b/tests/tck_test_clauses_merge.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_remove.c b/tests/tck_test_clauses_remove.c index 44ce6f1..7e79030 100644 --- a/tests/tck_test_clauses_remove.c +++ b/tests/tck_test_clauses_remove.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_return.c b/tests/tck_test_clauses_return.c index 5ab99cf..ff0bb12 100644 --- a/tests/tck_test_clauses_return.c +++ b/tests/tck_test_clauses_return.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension (macOS uses .dylib, Linux uses .so) #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_return_orderby.c b/tests/tck_test_clauses_return_orderby.c index 2c8e970..3f6e749 100644 --- a/tests/tck_test_clauses_return_orderby.c +++ b/tests/tck_test_clauses_return_orderby.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_return_skip_limit.c b/tests/tck_test_clauses_return_skip_limit.c index c617fdb..2ba8d29 100644 --- a/tests/tck_test_clauses_return_skip_limit.c +++ b/tests/tck_test_clauses_return_skip_limit.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_set.c b/tests/tck_test_clauses_set.c index 1383536..c635156 100644 --- a/tests/tck_test_clauses_set.c +++ b/tests/tck_test_clauses_set.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_union.c b/tests/tck_test_clauses_union.c index e5db26b..6e221af 100644 --- a/tests/tck_test_clauses_union.c +++ b/tests/tck_test_clauses_union.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_unwind.c b/tests/tck_test_clauses_unwind.c index 7194795..e789199 100644 --- a/tests/tck_test_clauses_unwind.c +++ b/tests/tck_test_clauses_unwind.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_with.c b/tests/tck_test_clauses_with.c index db8b80d..3b8d696 100644 --- a/tests/tck_test_clauses_with.c +++ b/tests/tck_test_clauses_with.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_with_orderBy.c b/tests/tck_test_clauses_with_orderBy.c index 235b701..7ad0a8d 100644 --- a/tests/tck_test_clauses_with_orderBy.c +++ b/tests/tck_test_clauses_with_orderBy.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_with_skip_limit.c b/tests/tck_test_clauses_with_skip_limit.c index 73794a1..db921ae 100644 --- a/tests/tck_test_clauses_with_skip_limit.c +++ b/tests/tck_test_clauses_with_skip_limit.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_clauses_with_where.c b/tests/tck_test_clauses_with_where.c index d5ba0db..8892c4c 100644 --- a/tests/tck_test_clauses_with_where.c +++ b/tests/tck_test_clauses_with_where.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_aggregation.c b/tests/tck_test_expressions_aggregation.c index 59e9b83..f4b6649 100644 --- a/tests/tck_test_expressions_aggregation.c +++ b/tests/tck_test_expressions_aggregation.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_boolean.c b/tests/tck_test_expressions_boolean.c index b3bb366..b2e77e5 100644 --- a/tests/tck_test_expressions_boolean.c +++ b/tests/tck_test_expressions_boolean.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_comparison.c b/tests/tck_test_expressions_comparison.c index 49060ea..6c6355a 100644 --- a/tests/tck_test_expressions_comparison.c +++ b/tests/tck_test_expressions_comparison.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_conditional.c b/tests/tck_test_expressions_conditional.c index ecb51d8..242ffbb 100644 --- a/tests/tck_test_expressions_conditional.c +++ b/tests/tck_test_expressions_conditional.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_existentialSubqueries.c b/tests/tck_test_expressions_existentialSubqueries.c index 8a6e97d..c2828fb 100644 --- a/tests/tck_test_expressions_existentialSubqueries.c +++ b/tests/tck_test_expressions_existentialSubqueries.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_graph.c b/tests/tck_test_expressions_graph.c index bb27799..2707439 100644 --- a/tests/tck_test_expressions_graph.c +++ b/tests/tck_test_expressions_graph.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_list.c b/tests/tck_test_expressions_list.c index aba293a..6bbf161 100644 --- a/tests/tck_test_expressions_list.c +++ b/tests/tck_test_expressions_list.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_literals.c b/tests/tck_test_expressions_literals.c index 7828016..b3301ea 100644 --- a/tests/tck_test_expressions_literals.c +++ b/tests/tck_test_expressions_literals.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_map.c b/tests/tck_test_expressions_map.c index 5f4af84..b5870ba 100644 --- a/tests/tck_test_expressions_map.c +++ b/tests/tck_test_expressions_map.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_mathematical.c b/tests/tck_test_expressions_mathematical.c index b6502c6..7f3a98c 100644 --- a/tests/tck_test_expressions_mathematical.c +++ b/tests/tck_test_expressions_mathematical.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_null.c b/tests/tck_test_expressions_null.c index 7527351..8ef8f6c 100644 --- a/tests/tck_test_expressions_null.c +++ b/tests/tck_test_expressions_null.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_path.c b/tests/tck_test_expressions_path.c index f3b130f..9dc2507 100644 --- a/tests/tck_test_expressions_path.c +++ b/tests/tck_test_expressions_path.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_pattern.c b/tests/tck_test_expressions_pattern.c index efbdc93..80b1014 100644 --- a/tests/tck_test_expressions_pattern.c +++ b/tests/tck_test_expressions_pattern.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_precedence.c b/tests/tck_test_expressions_precedence.c index f4d81e4..188a672 100644 --- a/tests/tck_test_expressions_precedence.c +++ b/tests/tck_test_expressions_precedence.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_quantifier.c b/tests/tck_test_expressions_quantifier.c index 62d3524..5699ba5 100644 --- a/tests/tck_test_expressions_quantifier.c +++ b/tests/tck_test_expressions_quantifier.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_string.c b/tests/tck_test_expressions_string.c index 061b4b9..d7621ea 100644 --- a/tests/tck_test_expressions_string.c +++ b/tests/tck_test_expressions_string.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_expressions_typeConversion.c b/tests/tck_test_expressions_typeConversion.c index bf721c7..b10d38a 100644 --- a/tests/tck_test_expressions_typeConversion.c +++ b/tests/tck_test_expressions_typeConversion.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_match_minimal.c b/tests/tck_test_match_minimal.c index 3a663fa..da7b75e 100644 --- a/tests/tck_test_match_minimal.c +++ b/tests/tck_test_match_minimal.c @@ -17,9 +17,9 @@ void setUp(void) { sqlite3_enable_load_extension(db, 1); #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_useCases_countingSubgraphMatches.c b/tests/tck_test_useCases_countingSubgraphMatches.c index c7afd92..2203b2b 100644 --- a/tests/tck_test_useCases_countingSubgraphMatches.c +++ b/tests/tck_test_useCases_countingSubgraphMatches.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/tck_test_useCases_triadicSelection.c b/tests/tck_test_useCases_triadicSelection.c index 90ad885..f93a27e 100644 --- a/tests/tck_test_useCases_triadicSelection.c +++ b/tests/tck_test_useCases_triadicSelection.c @@ -19,9 +19,9 @@ void setUp(void) { // Load graph extension #ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); #endif if (rc != SQLITE_OK) { printf("Failed to load graph extension: %s\n", error_msg); diff --git a/tests/test_create_debug.py b/tests/test_create_debug.py index f0951f9..dccafdd 100644 --- a/tests/test_create_debug.py +++ b/tests/test_create_debug.py @@ -13,10 +13,10 @@ def test_create_debug(): conn.enable_load_extension(True) try: - conn.load_extension("./build/libgraph.dylib") + conn.load_extension("./build/libgraph") except: try: - conn.load_extension("./build/libgraph.so") + conn.load_extension("./build/libgraph") except Exception as e: print(f"❌ Failed to load extension: {e}") return False diff --git a/tests/test_create_execution.py b/tests/test_create_execution.py index d3bceba..7fbdd0f 100644 --- a/tests/test_create_execution.py +++ b/tests/test_create_execution.py @@ -15,10 +15,10 @@ def test_create_execution(): # Load the graph extension try: - conn.load_extension("../build/libgraph.dylib") + conn.load_extension("../build/libgraph") except sqlite3.OperationalError as e: try: - conn.load_extension("../build/libgraph.so") + conn.load_extension("../build/libgraph") except sqlite3.OperationalError as e2: print(f"❌ Failed to load extension: {e}, {e2}") return False diff --git a/tests/test_create_parsing.py b/tests/test_create_parsing.py index 47a1fbb..9b8662b 100755 --- a/tests/test_create_parsing.py +++ b/tests/test_create_parsing.py @@ -17,10 +17,10 @@ def test_create_parsing(): # Load the graph extension try: - conn.load_extension("../build/libgraph.dylib") + conn.load_extension("../build/libgraph") except sqlite3.OperationalError as e: try: - conn.load_extension("../build/libgraph.so") + conn.load_extension("../build/libgraph") except sqlite3.OperationalError as e2: print(f"❌ Failed to load extension: {e}, {e2}") return False diff --git a/tests/test_create_simple.py b/tests/test_create_simple.py index 5531859..0c61d72 100644 --- a/tests/test_create_simple.py +++ b/tests/test_create_simple.py @@ -9,9 +9,9 @@ conn.enable_load_extension(True) try: - conn.load_extension("./build/libgraph.dylib") + conn.load_extension("./build/libgraph") except: - conn.load_extension("./build/libgraph.so") + conn.load_extension("./build/libgraph") print("Testing: CREATE ()") diff --git a/tests/test_create_tck.py b/tests/test_create_tck.py index c4d0665..b787d33 100644 --- a/tests/test_create_tck.py +++ b/tests/test_create_tck.py @@ -14,11 +14,11 @@ def run_tests(): # Load extension try: - conn.load_extension("./build/libgraph.dylib") + conn.load_extension("./build/libgraph") print("✅ Extension loaded\n") except: try: - conn.load_extension("./build/libgraph.so") + conn.load_extension("./build/libgraph") print("✅ Extension loaded\n") except Exception as e: print(f"❌ Failed to load extension: {e}") diff --git a/tests/test_create_with_label.py b/tests/test_create_with_label.py index 05a2559..0082768 100644 --- a/tests/test_create_with_label.py +++ b/tests/test_create_with_label.py @@ -9,9 +9,9 @@ conn.enable_load_extension(True) try: - conn.load_extension("./build/libgraph.dylib") + conn.load_extension("./build/libgraph") except: - conn.load_extension("./build/libgraph.so") + conn.load_extension("./build/libgraph") conn.execute("CREATE TABLE nodes(id INTEGER PRIMARY KEY, labels TEXT, properties TEXT)") conn.execute("CREATE TABLE edges(id INTEGER PRIMARY KEY, source INTEGER, target INTEGER, edge_type TEXT, properties TEXT)") diff --git a/tests/test_create_with_var.py b/tests/test_create_with_var.py index 97a01c2..76117ed 100644 --- a/tests/test_create_with_var.py +++ b/tests/test_create_with_var.py @@ -9,9 +9,9 @@ conn.enable_load_extension(True) try: - conn.load_extension("./build/libgraph.dylib") + conn.load_extension("./build/libgraph") except: - conn.load_extension("./build/libgraph.so") + conn.load_extension("./build/libgraph") conn.execute("CREATE TABLE nodes(id INTEGER PRIMARY KEY, labels TEXT, properties TEXT)") conn.execute("CREATE TABLE edges(id INTEGER PRIMARY KEY, source INTEGER, target INTEGER, edge_type TEXT, properties TEXT)") diff --git a/tests/test_cypher_basic.py b/tests/test_cypher_basic.py index 057b2eb..0491343 100644 --- a/tests/test_cypher_basic.py +++ b/tests/test_cypher_basic.py @@ -10,7 +10,7 @@ # Load extension try: - conn.load_extension('./build/libgraph.dylib') + conn.load_extension('./build/libgraph') print("✅ Extension loaded\n") except Exception as e: print(f"❌ Failed to load extension: {e}") diff --git a/tests/test_expression_support.py b/tests/test_expression_support.py index 0204036..d293911 100755 --- a/tests/test_expression_support.py +++ b/tests/test_expression_support.py @@ -20,10 +20,10 @@ def test_basic_expressions(): # Load the graph extension try: - conn.load_extension("../build/libgraph.dylib") + conn.load_extension("../build/libgraph") except sqlite3.OperationalError as e: try: - conn.load_extension("../build/libgraph.so") + conn.load_extension("../build/libgraph") except sqlite3.OperationalError as e2: print(f"❌ Failed to load extension: {e}, {e2}") return False diff --git a/tests/test_label_debug.py b/tests/test_label_debug.py index fc2135b..3ef9a5a 100644 --- a/tests/test_label_debug.py +++ b/tests/test_label_debug.py @@ -9,9 +9,9 @@ conn.enable_load_extension(True) try: - conn.load_extension("./build/libgraph.dylib") + conn.load_extension("./build/libgraph") except: - conn.load_extension("./build/libgraph.so") + conn.load_extension("./build/libgraph") print("Testing label extraction in logical plan") diff --git a/tests/test_match_return_simple b/tests/test_match_return_simple new file mode 100755 index 0000000..7196e9b Binary files /dev/null and b/tests/test_match_return_simple differ diff --git a/tests/test_match_return_simple.c b/tests/test_match_return_simple.c index 9e79b3a..60ea7e1 100644 --- a/tests/test_match_return_simple.c +++ b/tests/test_match_return_simple.c @@ -18,11 +18,7 @@ int main() { sqlite3_enable_load_extension(db, 1); /* Load extension */ -#ifdef __APPLE__ - rc = sqlite3_load_extension(db, "../build/libgraph.dylib", "sqlite3_graph_init", &err); -#else - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &err); -#endif + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &err); if (rc != SQLITE_OK) { fprintf(stderr, "Cannot load extension: %s\n", err); sqlite3_free(err); diff --git a/tests/test_performance b/tests/test_performance new file mode 100755 index 0000000..f9b6a50 Binary files /dev/null and b/tests/test_performance differ diff --git a/tests/test_performance.c b/tests/test_performance.c index 65694f2..cd88afc 100644 --- a/tests/test_performance.c +++ b/tests/test_performance.c @@ -26,7 +26,7 @@ sqlite3* create_test_db(void) { rc = sqlite3_enable_load_extension(db, 1); TEST_ASSERT_EQUAL(SQLITE_OK, rc); - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", NULL); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", NULL); TEST_ASSERT_EQUAL(SQLITE_OK, rc); // Create backing tables diff --git a/tests/test_quick.py b/tests/test_quick.py index 77f6fcc..e980470 100644 --- a/tests/test_quick.py +++ b/tests/test_quick.py @@ -3,7 +3,7 @@ conn = sqlite3.connect(':memory:') conn.enable_load_extension(True) -conn.load_extension('./build/libgraph.dylib') +conn.load_extension('./build/libgraph') print("✅ Extension loaded") conn.execute("CREATE VIRTUAL TABLE graph USING graph()") diff --git a/tests/test_storage b/tests/test_storage new file mode 100755 index 0000000..a0b9f28 Binary files /dev/null and b/tests/test_storage differ diff --git a/tests/test_storage.c b/tests/test_storage.c index 9103f2e..04012ff 100644 --- a/tests/test_storage.c +++ b/tests/test_storage.c @@ -22,7 +22,7 @@ sqlite3* create_test_db(const char* db_path) { rc = sqlite3_enable_load_extension(db, 1); TEST_ASSERT_EQUAL(SQLITE_OK, rc); - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", NULL); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", NULL); TEST_ASSERT_EQUAL(SQLITE_OK, rc); // Create backing tables if they don't exist diff --git a/tests/test_virtual_table_crud b/tests/test_virtual_table_crud old mode 100644 new mode 100755 index 4bb0645..063e81c Binary files a/tests/test_virtual_table_crud and b/tests/test_virtual_table_crud differ diff --git a/tests/test_virtual_table_crud.c b/tests/test_virtual_table_crud.c index c85331c..6ce965f 100644 --- a/tests/test_virtual_table_crud.c +++ b/tests/test_virtual_table_crud.c @@ -42,7 +42,7 @@ int main(void) { sqlite3_enable_load_extension(db, 1); - rc = sqlite3_load_extension(db, "../build/libgraph.so", "sqlite3_graph_init", &error_msg); + rc = sqlite3_load_extension(db, "../build/libgraph", "sqlite3_graph_init", &error_msg); printf("2. Load extension: %s\n", rc == SQLITE_OK ? "OK" : (error_msg ? error_msg : "Unknown error")); if (error_msg) { sqlite3_free(error_msg);