AssertableMapExtensions extension

Extension on Map<int, List<String>> that provides a human-readable serialization for use in test assertions.

final map = {4: ['BCBA', 'BDAB']};
print(map.assertable()); // "4: BCBA,BDAB;\n"

Each entry is formatted as key: sorted,values; on its own line.

on

Methods

assertable() String

Available on Map<int, List<String>>, provided by the AssertableMapExtensions extension

Returns a deterministic, human-readable string representation of this map.