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

Function MoreTypesProbability

src/Type.cpp:638–646  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

636
637// ---------------------------------------------------------------------
638static bool
639MoreTypesProbability(void)
640{
641 // Always have at least 10 types in the program.
642 if (AllTypes.size() < 10)
643 return true;
644 // by default 50% probability for each additional struct or union type.
645 return rnd_flipcoin(MoreStructUnionTypeProb);
646}
647
648// ---------------------------------------------------------------------
649eSimpleType

Callers 1

GenerateAllTypesFunction · 0.85

Calls 2

rnd_flipcoinFunction · 0.85
sizeMethod · 0.80

Tested by

no test coverage detected