mirror of
https://github.com/flutter/flutter.git
synced 2026-02-03 17:51:05 +08:00
21 lines
660 B
Dart
21 lines
660 B
Dart
// Copyright 2015 The Chromium 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 'dart:ui';
|
|
|
|
import 'package:test/test.dart' hide TypeMatcher, isInstanceOf;
|
|
|
|
void main() {
|
|
test('Should be able to build and layout a paragraph', () {
|
|
final ParagraphBuilder builder = ParagraphBuilder(ParagraphStyle());
|
|
builder.addText('Hello');
|
|
final Paragraph paragraph = builder.build();
|
|
expect(paragraph, isNotNull);
|
|
|
|
paragraph.layout(ParagraphConstraints(width: 800.0));
|
|
expect(paragraph.width, isNonZero);
|
|
expect(paragraph.height, isNonZero);
|
|
});
|
|
}
|