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

Function GenerateRandomIntConstant

src/Constant.cpp:112–123  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

110
111// --------------------------------------------------------------
112static string
113GenerateRandomIntConstant(void)
114{
115 string val;
116 // Int constant - Max 8 Hex digits on 32-bit platforms
117 if (CGOptions::ccomp() || !CGOptions::longlong())
118 val = "0x" + RandomHexDigits( 8 );
119 else
120 val = "0x" + RandomHexDigits( 8 ) + "L";
121
122 return val;
123}
124
125// --------------------------------------------------------------
126static string

Callers 1

GenerateRandomConstantFunction · 0.85

Calls 1

RandomHexDigitsFunction · 0.85

Tested by

no test coverage detected