MCPcopy Create free account
hub / github.com/nodejs/node / random_extra_flags

Function random_extra_flags

deps/v8/tools/testrunner/testproc/fuzzer.py:93–99  ·  view source on GitHub ↗

Returns a random list of flags chosen from the configurations in EXTRA_FLAGS.

(rng, extra_flags=EXTRA_FLAGS)

Source from the content-addressed store, hash-verified

91
92
93def random_extra_flags(rng, extra_flags=EXTRA_FLAGS):
94 """Returns a random list of flags chosen from the configurations in
95 EXTRA_FLAGS.
96 """
97 return list(chain(
98 *(flags.split(' ')
99 for prob, flags in extra_flags if rng.random() < prob)))
100
101
102def _flag_prefix(flag):

Callers 1

_create_genMethod · 0.85

Calls 3

randomMethod · 0.80
listFunction · 0.50
splitMethod · 0.45

Tested by

no test coverage detected