test sweep: icons, log.trace, DialogHost, FilesDropped getters (T-91)
Three small additions to push coverage toward the 90% target: - test/widgets/icons_test.dart: one sweep test calling .paint() on every custom ClideIconPainter (Check, ChevronRight, ChevronDown, Dot, Folder, Gear, GitBranch, Plug, Search, Terminal, Warning). - log_test: Logger.trace covered at minLevel.trace + filtered out at minLevel.info. - services_bigger_test: DialogRouter.current getter; DialogHost widget rendered with backdrop + inner builder, then dismissed through the router. Plus FilesDropped subsystem/kind getters exercised through the existing notifyDropped test. Coverage 89.08% -> 89.93%. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,5 +67,18 @@ void main() {
|
||||
expect(a, hasLength(1));
|
||||
expect(b, hasLength(1));
|
||||
});
|
||||
|
||||
test('trace records emit at minLevel.trace + are filtered above it', () {
|
||||
final got = <LogRecord>[];
|
||||
final log = Logger(minLevel: LogLevel.trace, sinks: [got.add]);
|
||||
log.trace('s', 'low-level detail');
|
||||
expect(got, hasLength(1));
|
||||
expect(got.first.level, LogLevel.trace);
|
||||
// Same call at info-level is filtered.
|
||||
got.clear();
|
||||
final filtered = Logger(minLevel: LogLevel.info, sinks: [got.add]);
|
||||
filtered.trace('s', 'still detail');
|
||||
expect(got, isEmpty);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user