Unverified Commit ec726103 authored by Myles Moylan's avatar Myles Moylan Committed by GitHub

Add simple unit tests for annotations.dart file (#128902)

This PR is adding a file of two simple unit tests in order to improve code coverage (covering two simple classes within the annotations.dart file).

The issue this is fixing is the lack of complete test coverage for the annotations.dart file.
parent aaaea51d
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
import 'package:flutter/foundation.dart';
import 'package:flutter_test/flutter_test.dart';
void main() {
test('test Category constructor', () {
const List<String> sections = <String>[
'First section',
'Second section',
'Third section'
];
const Category category = Category(sections);
expect(category.sections, sections);
});
test('test DocumentationIcon constructor', () {
const DocumentationIcon docIcon = DocumentationIcon('Test String');
expect(docIcon.url, contains('Test String'));
});
test('test Summary constructor', () {
const Summary summary = Summary('Test String');
expect(summary.text, contains('Test String'));
});
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment