LCOV - code coverage report

Current view
top level - src/converters - serialization_context.dart
Test
lcov.info
Date
2026-02-21
Legend
Lines
hit
not hit
Branches
taken
not taken
# not executed
HitTotalCoverage
Lines77100.0%
Functions00-
Branches00-
Each row represents a line of source code
LineBranchHitsSource code
1import 'dart:collection';
2
3class SerializationContext {
44 SerializationContext(bool Function(Object, Object) identical)
54 : _cache = HashMap(equals: identical);
6
7 final HashMap<Object, Object> _cache;
8
94 T? getReference<T extends Object>(Object data) {
108 final ref = _cache[data];
114 return (ref is T) ? ref : null;
12 }
13
144 void setReference<T extends Object>(Object data, T instance) {
158 _cache[data] = instance;
16 }
17}
Choose Features