std1.0.0-beta-7 SafeC docs

std :: debug::coverage

Struct std::Coverage

#include <std/debug/coverage.h> source

struct Coverage {
    struct CovSite sites[COV_MAX_SITES];
    int count;
}

Fields

§int countsource

Methods

§int register_site(const &char file, int line)source · definition

Register a new site; returns site index (for COV_HIT).

§void hit(int idx)source · definition

Increment hit count for site idx.

§unsigned long get(int idx) constsource · definition

Return hit count for site idx.

§void report() constsource · definition

Print all sites with hit counts to stdout (hosted only).

§int covered_count() constsource · definition

Return total number of sites with count > 0.

§int coverage_pct() constsource · definition

Return percentage of covered sites (0-100).

§void reset()source · definition

Reset all counts to zero.