Skip to content

Commit a504be7

Browse files
committed
tests for psname getter and size getter for PFont
1 parent 6225902 commit a504be7

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

core/test/processing/core/PFontTest.java

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,17 @@ public void constructor_setsSizeCorrectly() {
1212
PFont font = new PFont(awtFont, true, null); //call to constructor w specific values
1313
assertEquals(16, font.getSize()); //actual test, expects 16 compares against actual value
1414
}
15-
}
15+
16+
@Test
17+
public void test_psname_getCorrectName() {
18+
Font awtFont = new Font("Dialog", Font.PLAIN, 16); //Truth, what PFont size should be
19+
PFont font = new PFont(awtFont, true, null);
20+
assertEquals(awtFont.getPSName(), font.getName()); //test, expecting
21+
}
22+
23+
public void test_size_getCorrectSize() {
24+
Font awtFont = new Font("Dialog", Font.PLAIN, 16); //Truth, what PFont size should be
25+
PFont font = new PFont(awtFont, true, null);
26+
assertEquals(awtFont.getSize(), font.getSize()); //test, expecting
27+
}
28+
}

0 commit comments

Comments
 (0)