< Summary - Backend C Tests - Coverage Report (WSL)

Information
Class: test_graph_c
Assembly: src.backend.tests.unit
File(s): ./src/backend/tests/unit/test_graph.c
Line coverage
100%
Covered lines: 26
Uncovered lines: 0
Coverable lines: 26
Total lines: 39
Line coverage: 100%
Branch coverage
50%
Covered branches: 9
Total branches: 18
Branch coverage: 50%
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Coverage history

Coverage history 0 25 50 75 100 2/18/2026 - 10:50:55 PM Line coverage: 100% (26/26) Branch coverage: 50% (9/18) Total lines: 39 2/18/2026 - 10:50:55 PM Line coverage: 100% (26/26) Branch coverage: 50% (9/18) Total lines: 39

File(s)

./src/backend/tests/unit/test_graph.c

#LineLine coverage
 1#include <stdio.h>
 2#include <assert.h>
 3#include "../../core/data_structures/graph.h"
 4
 15void test_graph_init() {
 6  Graph g;
 17  initGraph(&g);
 18  assert(g.count == 0);
 19  printf("Graph Init Test Passed\n");
 110}
 11
 112void test_graph_ops() {
 13  Graph g;
 114  initGraph(&g);
 15  // Add machines (Nodes)
 116  assert(addMachineNode(&g, 100) == true);
 117  assert(addMachineNode(&g, 200) == true);
 118  assert(addMachineNode(&g, 300) == true);
 19  // Dependencies: 100 -> 200 (100 depends on 200)
 120  assert(addDependency(&g, 100, 200) == true);
 121  assert(hasDependency(&g, 100, 200) == true);
 122  assert(hasDependency(&g, 200, 100) == false);
 23  // Remove dependency
 124  assert(removeDependency(&g, 100, 200) == true);
 125  assert(hasDependency(&g, 100, 200) == false);
 126  printf("Graph Ops Test Passed\n");
 127}
 28
 129void run_graph_tests() {
 130  printf("Running Graph Tests...\n");
 131  test_graph_init();
 132  test_graph_ops();
 133  printf("All Graph Tests Passed!\n");
 134}
 35
 136int main() {
 137  run_graph_tests();
 138  return 0;
 39}

Methods/Properties