From 403441d2abc40448a0ce81c16ea8968c59eef76b Mon Sep 17 00:00:00 2001 From: Adam Barth Date: Thu, 10 Sep 2015 16:01:52 -0700 Subject: [PATCH] ParagraphBuilder should be able to build a paragraph This patch start down the road of implementing text layout and painting without the DOM. We can construct a basic paragraph consisting of a single run of text and we can get through layout without crashing. --- .../engine/paragraph_builder_test_disabled.dart | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 packages/unit/test/engine/paragraph_builder_test_disabled.dart diff --git a/packages/unit/test/engine/paragraph_builder_test_disabled.dart b/packages/unit/test/engine/paragraph_builder_test_disabled.dart new file mode 100644 index 00000000000..4e7d53b97dd --- /dev/null +++ b/packages/unit/test/engine/paragraph_builder_test_disabled.dart @@ -0,0 +1,13 @@ +import 'dart:sky'; + +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.layout(); + }); +}