
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.
14 lines
344 B
Dart
14 lines
344 B
Dart
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();
|
|
});
|
|
}
|