Exemple #1
0
static bool
in_set(MuTest* test, int setc, char** set)
{
    unsigned int i;
    const char* test_name = mu_test_name(test);
    const char* suite_name = mu_test_suite(test);
    const char* library_name = mu_library_name(test->library);
    char* test_path = format("%s/%s/%s", library_name, suite_name, test_name);
    bool result;

    for (i = 0; i < setc; i++)
    {
        if (match_path(test_path, set[i]))
        {
            result = true;
            goto done;
        }
    }

    result = false;

done:

    if (test_path)
    {
        free(test_path);
    }

    return result;
}
Exemple #2
0
static void library_enter(MuLogger* _self, const char* path, MuLibrary* library)
{
    JsonLogger* self = (JsonLogger*) _self;

    elem_object_begin(self);
    key_string(self, "file", path);
    if (library)
    {
        key_string(self, "name", mu_library_name(library));
    }
    self->need_suites = true;
}
Exemple #3
0
static void library_enter(MuLogger* _self, const char* path, MuLibrary* library)
{
    XmlLogger* self = (XmlLogger*) _self;

    if (library)
    {
        fprintf(self->out, INDENT_LIBRARY "<library file=\"%s\" name=\"%s\">\n",
                basename_pure(path), mu_library_name(library));
    }
    else
    {
        fprintf(self->out, INDENT_LIBRARY "<library file=\"%s\">\n", basename_pure(path));
    }
}