Skip to content

Commit

Permalink
Adding basic test in test_nc_galaxy_sd_z_proxy_dirac.c
Browse files Browse the repository at this point in the history
  • Loading branch information
caioolivv committed May 7, 2024
1 parent b938de1 commit d4d0e14
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions tests/test_nc_galaxy_sd_z_proxy_dirac.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ static void test_nc_galaxy_sd_z_proxy_dirac_new (TestNcGalaxySDZProxyDirac *test

static void test_nc_galaxy_sd_z_proxy_dirac_free (TestNcGalaxySDZProxyDirac *test, gconstpointer pdata);

static void test_nc_galaxy_sd_z_proxy_dirac_basic (TestNcGalaxySDZProxyDirac *test, gconstpointer pdata);

static void test_nc_galaxy_sd_z_proxy_dirac_serialize (TestNcGalaxySDZProxyDirac *test, gconstpointer pdata);

static void test_nc_galaxy_sd_z_proxy_dirac_gen (TestNcGalaxySDZProxyDirac *test, gconstpointer pdata);
Expand All @@ -62,6 +64,11 @@ main (gint argc, gchar *argv[])
&test_nc_galaxy_sd_z_proxy_dirac_serialize,
&test_nc_galaxy_sd_z_proxy_dirac_free);

g_test_add ("/nc/galaxy_sd_z_proxy/dirac/basic", TestNcGalaxySDZProxyDirac, NULL,
&test_nc_galaxy_sd_z_proxy_dirac_new,
&test_nc_galaxy_sd_z_proxy_dirac_basic,
&test_nc_galaxy_sd_z_proxy_dirac_free);

g_test_add ("/nc/galaxy_sd_z_proxy/dirac/gen", TestNcGalaxySDZProxyDirac, NULL,
&test_nc_galaxy_sd_z_proxy_dirac_new,
&test_nc_galaxy_sd_z_proxy_dirac_gen,
Expand Down Expand Up @@ -94,6 +101,19 @@ test_nc_galaxy_sd_z_proxy_dirac_free (TestNcGalaxySDZProxyDirac *test, gconstpoi
NCM_TEST_FREE (nc_galaxy_sd_z_proxy_dirac_free, test->sdzpd);
}

static void
test_nc_galaxy_sd_z_proxy_dirac_basic (TestNcGalaxySDZProxyDirac *test, gconstpointer pdata)
{
NcGalaxySDZProxyDirac *sdzpd = test->sdzpd;
NcGalaxySDZProxyDirac *sdzpd2;

sdzpd2 = nc_galaxy_sd_z_proxy_dirac_ref (sdzpd);
nc_galaxy_sd_z_proxy_dirac_clear (&sdzpd2);
g_assert_true (sdzpd2 == NULL);

g_assert_true (NC_IS_GALAXY_SD_Z_PROXY_DIRAC (sdzpd));
}

static void
test_nc_galaxy_sd_z_proxy_dirac_serialize (TestNcGalaxySDZProxyDirac *test, gconstpointer pdata)
{
Expand Down

0 comments on commit d4d0e14

Please sign in to comment.