crashtest.hxsmith.features.maps
Map<Int, T> and Map<String, T>: literals, get/set/exists/remove, ?? defaults, sorted-key iteration.
Iteration order of a Map is unspecified, so output never depends on it: keys are collected and sorted first,
and the one unsorted for (k => v in m) loop only folds into an Int with a commutative operator.
class Maps(Feature)
name
name = 'maps'
summary
summary = 'Map<Int|String, T>: literal, set/get/exists/remove, ??, sorted-key iteration'
covers
covers = ('EArrayDecl', 'EArray', 'EFor', 'EBinop', 'ENew', 'std:Map')
order
order = 26
types
def types(g: Gen, depth: int)
exprs
def exprs(g: Gen, ty: Ty)
stmts
def stmts(g: Gen)
show
def show(g: Gen, ty: Ty, expr: str)
supported
def supported(ty: Ty) -> bool