MCPcopy Create free account
hub / github.com/csmith-project/csmith / StatementProbability

Function StatementProbability

src/Statement.cpp:221–229  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

219*/
220
221static eStatementType
222StatementProbability(const StatementFilter *filter)
223{
224 int value = rnd_upto(100, filter);
225 ERROR_GUARD(MAX_STATEMENT_TYPE);
226 assert(value != -1);
227 assert(value >= 0 && value < 100);
228 return Statement::number_to_type(value);
229}
230
231int Statement::sid = 0;
232/*

Callers 1

make_randomMethod · 0.85

Calls 1

rnd_uptoFunction · 0.85

Tested by

no test coverage detected