Coverage Report

Created: 2026-10-24 08:16

/work/auto_tests/scenarios/scenario_conference_two_test.c
Line
Count
Source (jump to first uncovered line)
1
#include "framework/framework.h"
2
#include <stdio.h>
3
4
static void tox_script(ToxNode *self, void *ctx)
5
1
{
6
1
    Tox *tox = tox_node_get_tox(self);
7
8
1
    tox_node_log(self, "Creating conference 1...");
9
1
    Tox_Err_Conference_New err;
10
1
    tox_conference_new(tox, &err);
11
1
    if (err != TOX_ERR_CONFERENCE_NEW_OK) {
12
0
        tox_node_log(self, "Failed to create conference 1: %u", err);
13
0
        return;
14
0
    }
15
16
1
    tox_node_log(self, "Creating conference 2...");
17
1
    tox_conference_new(tox, &err);
18
1
    if (err != TOX_ERR_CONFERENCE_NEW_OK) {
19
0
        tox_node_log(self, "Failed to create conference 2: %u", err);
20
0
        return;
21
0
    }
22
1
}
23
24
int main(int argc, char *argv[])
25
31
{
26
31
    ToxScenario *s = tox_scenario_new(argc, argv, 60000);
27
31
    tox_scenario_add_node(s, "Node", tox_script, nullptr, 0);
28
29
    // Just run it until completion
30
31
    ToxScenarioStatus res = tox_scenario_run(s);
31
31
    if (res != TOX_SCENARIO_DONE) {
32
0
        tox_scenario_log(s, "Test failed with status %u", res);
33
0
        return 1;
34
0
    }
35
36
31
    tox_scenario_free(s);
37
31
    return 0;
38
31
}