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.
This commit is contained in:
Adam Barth 2015-09-10 16:01:52 -07:00
parent 63101e49bc
commit 403441d2ab

View File

@ -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();
});
}