CoverageReport.h header
#include <ew/app/branching/CoverageReport.h>
Namespace ew::app::branching
SceneCoverage struct
struct ew::app::branching::SceneCoverage
What has and has not been walked in one scene.
The distinction that makes this worth having is between "never reachable" and "merely never visited". The first is a defect the analysis already reports; the second is a gap in TESTING, and a report that ran them together would tell a lead to go and play a branch nothing can reach.
Members
std::vector<ew::core::foundation::BranchNodeId> ew::app::branching::SceneCoverage::neverVisited
Nodes no recorded run arrived at, but which a playthrough could reach: the work still to do.
std::vector<ew::core::foundation::BranchNodeId> ew::app::branching::SceneCoverage::neverReachable
Nodes no recorded run arrived at because nothing CAN: the validator's own finding, repeated here so a lead reading the coverage list is not sent to play something unplayable.
std::vector<CoverageLink> ew::app::branching::SceneCoverage::neverTaken
Links no recorded run took, from a node that has been visited.
A link out of a node nobody has reached is not news – the node is already on the list above, and listing its links as well would bury the branches somebody stood in front of and did not take, which are the interesting ones.
std::vector<ew::core::foundation::BranchNodeId> ew::app::branching::SceneCoverage::unreachedEndings
Endings no recorded run finished at. An ending is a node with no way onward.
std::size_t ew::app::branching::SceneCoverage::visitedNodes = 0
How many of the scene's nodes at least one run arrived at.
std::size_t ew::app::branching::SceneCoverage::totalNodes = 0
How many nodes the scene has.
std::size_t ew::app::branching::SceneCoverage::takenLinks = 0
How many of the scene's links at least one run took.
std::size_t ew::app::branching::SceneCoverage::totalLinks = 0
How many links the scene has.
std::size_t ew::app::branching::SceneCoverage::runs = 0
How many recorded runs began in this scene.
bool ew::app::branching::SceneCoverage::analysisTruncated = false
Whether the reachability analysis gave up before finishing.
Carried out of ew::app::branching::SimulationResult::truncated rather than swallowed: a truncated walk UNDER-reports reachability, so neverReachable may then name a node a reader can actually get to, and a report that stated it as fact would be wrong with total confidence.
bool operator==(const SceneCoverage &, const SceneCoverage &)=default
Coverage compares equal when every field matches.
Types
using ew::app::branching::CoverageLink = std::pair<ew::core::foundation::BranchNodeId, ew::core::foundation::BranchNodeId>
A link somebody either took or did not: the node left, and the node arrived at.
Functions
ew::core::branching::CoveragePath ew::app::branching::pathFromTranscript(const std::vector< PlayStep > &transcript, QString source)
transcript as a recordable path, stopping at the first FORCED step.
A forced step is evidence of nothing. Forcing a shut branch is how an author reaches a late-game line, and the branch behind the gate may be unreachable for every real reader; counting it as covered would report tested exactly the paths nobody can play. Everything up to the force was walked legitimately and is kept.
source names where the run came from – the editor, or a studio's build.
SceneCoverage ew::app::branching::sceneCoverage(const ew::core::project::Project &project, const ew::core::branching::BranchScene &scene, const ew::core::branching::BranchCoverage &coverage)
What coverage says about scene, in project.
Every recorded path is walked, not only those that began in this scene: a run that started elsewhere and jumped in covered these nodes just as much, and counting only the runs that began here would report a called scene as untested however often it had been played.
std::set< CoverageLink > ew::app::branching::takenLinks(const ew::core::branching::BranchCoverage &coverage)
Every link any recorded path took, as the pair of nodes it ran between.
Consecutive nodes in a path, which is what a link IS to a walk. It cannot tell two parallel links between the same pair apart – and neither can a reader, since taking either produces the same two steps.
std::set< ew::core::foundation::BranchNodeId > ew::app::branching::visitedNodes(const ew::core::branching::BranchCoverage &coverage)
Every node any recorded path arrived at, across every scene.