Пример #1
0
void destroy_reporter(TestReporter *reporter) {
    destroy_breadcrumb((CgreenBreadcrumb *)reporter->breadcrumb);
    destroy_memo((TestReportMemo *)reporter->memo);
    free(reporter);
    /* hack to allow destroy_reporter to be called in cute_reporter_tests when
     * tests are running in same process
     */
    if (context.reporter == reporter)
    {
        context.reporter = NULL;
    }
}
Пример #2
0
void last_name_pushed_is_current() {
    Breadcrumb *breadcrumb = create_breadcrumb();
    push_breadcrumb(breadcrumb, "Hello");
    assert_string_equal(get_current_from_breadcrumb(breadcrumb), "Hello");
    destroy_breadcrumb(breadcrumb);
}
Пример #3
0
void can_destroy_empty_breadcrumb() {
    destroy_breadcrumb(create_breadcrumb());
}
Пример #4
0
void destroy_reporter(TestReporter *reporter) {
    destroy_breadcrumb((CgreenBreadcrumb *)reporter->breadcrumb);
    free(reporter);
    context.reporter = NULL;
}