Ejemplo n.º 1
0
int test_crossover_config_new_and_destroy(void)
{
    float uninit = -1.0f;
    struct crossover_config *cc = crossover_config_new(0);

    mu_check(cc->method == 0);
    mu_check(fltcmp(&cc->probability, &uninit) == 0);

    crossover_config_destroy(cc);
    return 0;
}
Ejemplo n.º 2
0
int test_crossover_config_new_and_destroy(void)
{
    float uninit = -1.0f;
    struct crossover_config *cc;

    /* setup */
    cc = crossover_config_new();

    /* assert */
    mu_check(cc->methods == NULL);
    mu_check(fltcmp(cc->probability, uninit) == 0);

    /* clean up */
    crossover_config_destroy(cc);

    return 0;
}