-
Notifications
You must be signed in to change notification settings - Fork 236
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ee9bb60
commit 9878d04
Showing
2 changed files
with
45 additions
and
3 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
richtextfx/src/test/java/org/fxmisc/richtext/ParagraphTest.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.fxmisc.richtext; | ||
|
||
import static org.junit.Assert.*; | ||
|
||
import org.junit.Test; | ||
|
||
public class ParagraphTest { | ||
|
||
// Tests that when concatenating two paragraphs, | ||
// the style of the first one is used for the result. | ||
// This relates to merging text changes and issue #216. | ||
@Test | ||
public void concatEmptyParagraphsTest() { | ||
Paragraph<Boolean, Void> p1 = new Paragraph<>(null, "", true); | ||
Paragraph<Boolean, Void> p2 = new Paragraph<>(null, "", false); | ||
|
||
Paragraph<Boolean, Void> p = p1.concat(p2); | ||
|
||
assertEquals(Boolean.TRUE, p.getStyleAtPosition(0)); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters