From c0368f0d98ebbfe1f1286c1f866d78f87eaca486 Mon Sep 17 00:00:00 2001 From: eggnstone Date: Fri, 19 Jul 2024 13:14:08 +0200 Subject: [PATCH] Fixed MixinDeclaration with base. --- lib/src/Formatters/MixinDeclarationFormatter.dart | 1 + test/Formatters/MixinDeclarationFormatter_test.dart | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/src/Formatters/MixinDeclarationFormatter.dart b/lib/src/Formatters/MixinDeclarationFormatter.dart index 2442321..4c5bba4 100644 --- a/lib/src/Formatters/MixinDeclarationFormatter.dart +++ b/lib/src/Formatters/MixinDeclarationFormatter.dart @@ -26,6 +26,7 @@ class MixinDeclarationFormatter extends IFormatter throw FormatException('Not a MixinDeclaration: ${node.runtimeType}'); formatState.acceptList(node.sortedCommentAndAnnotations, astVisitor, '$methodName/node.sortedCommentAndAnnotations'); + formatState.copyEntity(node.baseKeyword, astVisitor, '$methodName/node.baseKeyword'); formatState.copyEntity(node.mixinKeyword, astVisitor, '$methodName/node.mixinKeyword'); formatState.copyEntity(node.name, astVisitor, '$methodName/node.name'); formatState.copyEntity(node.typeParameters, astVisitor, '$methodName/node.typeParameters'); diff --git a/test/Formatters/MixinDeclarationFormatter_test.dart b/test/Formatters/MixinDeclarationFormatter_test.dart index c8bdbe1..9d3110e 100644 --- a/test/Formatters/MixinDeclarationFormatter_test.dart +++ b/test/Formatters/MixinDeclarationFormatter_test.dart @@ -14,15 +14,14 @@ void main() final List testGroupConfigs = [ TestGroupConfig( inputNodeCreator: AstCreator.createDeclaration, - inputMiddle: 'mixin M on A, B{}', - name: 'MixinDeclaration / mixin M on A, B{}', + inputMiddle: 'base mixin M on A, B{}', + name: 'MixinDeclaration / base mixin M on A, B{}', astVisitors: >[ - //TestVisitor(8, 'on A, B') OnClause => MixinOnClause - TestVisitor(8, 'on A, B') + TestVisitor(13, 'on A, B') ], testConfigs: [ TestConfig.none(), - TestConfig('mixin M on A, B\n{\n}\n') + TestConfig('base mixin M on A, B\n{\n}\n') ] ) ];