flutter_flutter/testing/dart/paragraph_builder_test.dart
Jason Simmons d92d4c1b03 Script that runs engine unit tests and Dart tests of engine APIs (#3372)
The Dart tests were migrated from the flutter/test/engine suite in the
framework repository
2017-01-30 10:52:44 -08:00

21 lines
629 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';
void main() {
test("Should be able to build and layout a paragraph", () {
ParagraphBuilder builder = new ParagraphBuilder(new ParagraphStyle());
builder.addText('Hello');
Paragraph paragraph = builder.build();
expect(paragraph, isNotNull);
paragraph.layout(new ParagraphConstraints(width: 800.0));
expect(paragraph.width, isNonZero);
expect(paragraph.height, isNonZero);
});
}