mirror of
https://github.com/flutter/flutter.git
synced 2025-06-03 00:51:18 +00:00
22 lines
552 B
Dart
22 lines
552 B
Dart
import 'dart:ui';
|
|
|
|
import 'package:test/test.dart';
|
|
|
|
void main() {
|
|
test("Should be able to build and layout a paragraph", () {
|
|
ParagraphBuilder builder = new ParagraphBuilder();
|
|
builder.addText('Hello');
|
|
Paragraph paragraph = builder.build(new ParagraphStyle());
|
|
expect(paragraph, isNotNull);
|
|
|
|
paragraph.minWidth = 0.0;
|
|
paragraph.maxWidth = 800.0;
|
|
paragraph.minHeight = 0.0;
|
|
paragraph.maxHeight = 600.0;
|
|
|
|
paragraph.layout();
|
|
expect(paragraph.width, isNonZero);
|
|
expect(paragraph.height, isNonZero);
|
|
});
|
|
}
|