summaryrefslogtreecommitdiff
path: root/ccan/strgrp/test/api_iterate_one_group.c
blob: b363c2c15d6111c3e6b3d97289e91cd71a513945 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include "../test/helpers.h"

int main(void) {
    struct strgrp *ctx;
    struct strgrp_iter *iter;

    plan_tests(2);
    create(ctx, DEFAULT_SIMILARITY);
    strgrp_add(ctx, "a", NULL);
    iter = strgrp_iter_new(ctx);
    ok1(strgrp_iter_next(iter));
    ok1(!strgrp_iter_next(iter));
    strgrp_iter_free(iter);
    strgrp_free(ctx);
    return exit_status();
}