Commit 4dd40e34 authored by James Collier's avatar James Collier

Correctly set up data for tests

parent 113c6de5
Pipeline #4571767 passed with stages
in 5 minutes and 24 seconds
......@@ -272,6 +272,8 @@ START_TEST (create_vecset)
vs = malloc(sizeof(struct vector_set));
fail_if(vs == NULL, NULL);
vs->coil_length = 0;
vs->divider = 140;
err = vector_set_init_from_db_with_size(vs, "./data/test_split.db", 140);
fail_unless(err == ENONE, NULL);
fail_unless(vs->vector_count == 140, NULL);
......@@ -303,6 +305,7 @@ START_TEST (create_vecset_fail)
vs = malloc(sizeof(struct vector_set));
fail_if(vs == NULL, NULL);
vs->coil_length = 0;
err = vector_set_init_from_db_with_size(vs, "nonexistent.file", 1);
fail_unless(err == EEXIST, NULL);
......@@ -319,6 +322,8 @@ START_TEST (proceed_vecset)
vs = malloc(sizeof(struct vector_set));
fail_if(vs == NULL, NULL);
vs->coil_length = 0;
vs->divider = 140;
err = vector_set_init_from_db_with_size(vs, "./data/test_split.db", 140);
fail_unless(err == ENONE, NULL);
fail_unless(vs->current_vector == 0, NULL);
......@@ -382,6 +387,8 @@ START_TEST (clone_vecset)
vs = malloc(sizeof(struct vector_set));
fail_if(vs == NULL, NULL);
vs->coil_length = 0;
vs->divider = 10;
err = vector_set_init_from_db_with_size(vs, "./data/test_split.db", 10);
fail_unless(err == ENONE, NULL);
fail_unless(vs->vector_count == 10, NULL);
......@@ -431,6 +438,8 @@ START_TEST (restrict_vecset)
vs = malloc(sizeof(struct vector_set));
fail_if(vs == NULL, NULL);
vs->coil_length = 0;
vs->divider = 10;
err = vector_set_init_from_db_with_size(vs, "./data/test_split.db", 10);
fail_unless(err == ENONE, NULL);
fail_unless(vs->vector_count == 10, NULL);
......@@ -479,6 +488,8 @@ START_TEST (translate_com_vecset)
vs = malloc(sizeof(struct vector_set));
fail_if(vs == NULL, NULL);
vs->coil_length = 0;
vs->divider = 1;
err = vector_set_init_from_db_with_size(vs, "./data/test_split.db", 1);
fail_unless(err == ENONE, NULL);
v = vs->centered;
......@@ -500,6 +511,8 @@ START_TEST (translate_com_vecset)
fail_unless(v->Z == stored.Z, NULL);
vector_set_destroy(vs);
vs->coil_length = 0;
vs->divider = 2;
err = vector_set_init_from_db_with_size(vs, "./data/test_split.db", 2);
fail_unless(err == ENONE, NULL);
v = vs->centered;
......@@ -571,6 +584,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts1qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts1data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -586,6 +601,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts2qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts2data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -601,6 +618,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts3qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts3data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -616,6 +635,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts4qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts4data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -631,6 +652,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts5qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts5data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -646,6 +669,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts6qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts6data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -661,6 +686,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts7qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts7data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -676,6 +703,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts8qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts8data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -691,6 +720,8 @@ START_TEST(superpose_basic)
err = vector_set_init_query_from_db(u, "./data/ts9qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts9data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -728,6 +759,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts1qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts1data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -743,6 +776,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts2qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts2data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -758,6 +793,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts3qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts3data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -773,6 +810,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts4qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts4data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -788,6 +827,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts5qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts5data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -803,6 +844,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts6qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts6data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -818,6 +861,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts7qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts7data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -833,6 +878,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts8qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts8data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......@@ -848,6 +895,8 @@ START_TEST(superpose_gershgorin)
err = vector_set_init_query_from_db(u, "./data/ts9qry.db");
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == 10, NULL);
v->coil_length = 0;
v->divider = u->vector_count;
err = vector_set_init_from_db_with_size(v, "./data/ts9data.db", u->vector_count);
fail_unless(err == ENONE, NULL);
fail_unless(u->vector_count == v->vector_count, NULL);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment