LCOV - code coverage report
Current view: top level - lib/templates - template.dart (source / functions) Hit Total Coverage
Test: lcov.info Lines: 3 7 42.9 %
Date: 2022-01-14 16:05:24 Functions: 0 0 -

          Line data    Source code
       1             : import 'package:class_fields/domain/class.dart';
       2             : 
       3             : ///{@template template}
       4             : /// The interface for all templates
       5             : /// {@endtemplate}
       6             : abstract class Template {
       7             :   /// {@macro template}
       8           1 :   const Template(this.subject);
       9             : 
      10             :   /// the [Class] of the template to generate code for
      11             :   final Class subject;
      12             : 
      13             :   /// Add the template ([generate]) to the given [buffer]
      14           1 :   void addToBuffer(StringBuffer buffer) {
      15           1 :     generate(buffer);
      16             :   }
      17             : 
      18             :   /// Generate the template
      19             :   void generate(StringBuffer buffer);
      20             : 
      21           0 :   @override
      22             :   String toString() {
      23           0 :     final buffer = StringBuffer();
      24           0 :     generate(buffer);
      25             : 
      26           0 :     return buffer.toString();
      27             :   }
      28             : }

Generated by: LCOV version 1.15