Skip to content

Commit b037696

Browse files
committed
Setup The Test File, Wrote up what should be
tested first by chunks.
1 parent 32ef5d5 commit b037696

File tree

2 files changed

+47
-1
lines changed

2 files changed

+47
-1
lines changed
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package processing.core;
22

33
public class PFontTest {
4-
//this is a new class to see if I can push to my fork
54

65
}
6+
7+
//Write Tests HERE!
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
What I think we need to test for broken up into chunks... trying to keep it organized
3+
4+
Chunk A — Construction and initialization
5+
6+
EED TO TEST IF...
7+
8+
the object starts in the correct mode
9+
important fields are initialized correctly
10+
lookup structures are prepared correctly
11+
lazy vs non-lazy behavior is set based on constructor input
12+
charset input is handled safely and predictably
13+
14+
SOME TEST EXAMPLES...
15+
16+
charset == null should put the font in lazy mode
17+
ascii array should start filled with -1
18+
provided charset should be sorted internally, without changing the caller’s original array
19+
only displayable characters should become glyphs
20+
ascent/descent get initialized one way or another
21+
22+
Chunk B — Serialization and deserialization
23+
24+
NEED TO TEST IF...
25+
26+
font data can be saved and loaded without corruption
27+
important metadata survives the round trip
28+
glyph structure and bitmap data remain consistent
29+
bad/invalid serialized data fails in the expected way
30+
31+
SOME TEST EXAMPLES...
32+
33+
save a font, reload it, compare glyphCount, size, name, psname, smooth
34+
glyph widths/heights still match after reload
35+
invalid stream data should throw instead of silently building a broken font
36+
37+
38+
39+
Chunk C — Glyph insertion and ordering --will add more if we get through chunks A & B
40+
Chunk D — Glyph lookup and lazy loading
41+
Chunk E — Metrics and width calculations
42+
Chunk F — Native font integration
43+
Chunk G — Shape generation
44+
Chunk H — Static charset and font listing
45+
Chunk I — Glyph inner-class bitmap/header behavior

0 commit comments

Comments
 (0)