|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectbb.gui.FontUtil.UnitTest
public static class FontUtil.UnitTest
See the Overview page of the project's javadocs for a general description of this unit test class.
Field Summary | |
---|---|
private static String |
charsAll
Contains all possible char values, in sequence, from Character.MIN_VALUE to Character.MAX_VALUE . |
Constructor Summary | |
---|---|
private |
FontUtil.UnitTest()
This sole private constructor suppresses the default (public) constructor, ensuring non-instantiability outside of this class. |
Method Summary | |
---|---|
private static void |
benchmark_findBestFont()
Results on 2009-02-16 on my 2.0 GHz Core 2 Duo laptop (server jvm):
findBestFont: first = 2.089 s, mean = 2.083 s (CI deltas: -568.671 us, +587.207 us), sd = 2.294 ms (CI deltas: -335.538 us, +446.633 us) WARNING: execution times have mild outliers, SD VALUES MAY BE INACCURATE
|
private static void |
benchmark_rankFonts()
Results on 2009-02-16 on my 2.0 GHz Core 2 Duo laptop (server jvm):
rankFonts: first = 2.091 s, mean = 2.082 s (CI deltas: -969.569 us, +3.074 ms), sd = 6.229 ms (CI deltas: -4.050 ms, +7.450 ms) WARNING: EXECUTION TIMES HAVE EXTREME OUTLIERS, SD VALUES MAY BE INACCURATE
|
static void |
main(String[] args)
Tests the parent class. |
private static void |
test_findBestFont()
Results on 2009-02-16 on my 2.0 GHz Core 2 Duo laptop (server jvm):
findBestFont(charsAll): java.awt.Font[family=Arial Unicode MS,name=Arial Unicode MS,style=plain,size=12]
|
private static void |
test_findBestFontFamily()
Results on 2009-02-16 on my 2.0 GHz Core 2 Duo laptop (server jvm):
findBestFontFamily("Courier New", "Courier", "Terminal", "FixedSys", "Andale Mono", "Lucida Console", "Monaco", "Monospaced"): Courier New
|
private static void |
test_findDisplayableCharPercent()
Results on 2009-02-16 on my 2.0 GHz Core 2 Duo laptop (server jvm):
findDisplayableCharPercent(aLogicalFont, charsAll) = 0.565673828125
|
private static void |
test_getFontFamilyNames()
Results on 2009-08-21 (2.5 GHz Xeon E5420 desktop, jdk 1.6.0_15 server jvm):
|
private static void |
test_getFonts()
Results on 2009-08-21 (2.5 GHz Xeon E5420 desktop, jdk 1.6.0_15 server jvm):
|
private static void |
test_rankFonts()
(Abbreviated) Results on 2009-02-16 on my 2.0 GHz Core 2 Duo laptop (server jvm):
rankFonts(charsFromManyLanguages):
font = java.awt.Font[family=Arial Unicode MS,name=Arial Unicode MS,style=plain,size=12], rank = 0.5940704345703125
font = java.awt.Font[family=Dialog,name=Dialog.bold,style=plain,size=12], rank = 0.565673828125
font = java.awt.Font[family=Dialog,name=Dialog.plain,style=plain,size=12], rank = 0.565673828125
font = java.awt.Font[family=SansSerif,name=SansSerif.bold,style=plain,size=12], rank = 0.565673828125
... |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final String charsAll
Character.MIN_VALUE
to Character.MAX_VALUE
.
Constructor Detail |
---|
private FontUtil.UnitTest()
Method Detail |
---|
public static void main(String[] args)
If this method is this Java process's entry point (i.e. first main
method),
then its final action is a call to System.exit
, which means that this method never returns;
its exit code is 0 if it executes normally, 1 if it throws a Throwable (which will be caught and logged).
Otherwise, this method returns and leaves the JVM running.
private static void test_getFontFamilyNames()
private static void test_getFonts()
private static void test_findDisplayableCharPercent()
findDisplayableCharPercent(aLogicalFont, charsAll) = 0.565673828125
private static void test_findBestFontFamily() throws Exception
findBestFontFamily("Courier New", "Courier", "Terminal", "FixedSys", "Andale Mono", "Lucida Console", "Monaco", "Monospaced"): Courier New
Exception
private static void test_findBestFont() throws Exception
findBestFont(charsAll): java.awt.Font[family=Arial Unicode MS,name=Arial Unicode MS,style=plain,size=12]
Exception
private static void benchmark_findBestFont() throws Exception
findBestFont: first = 2.089 s, mean = 2.083 s (CI deltas: -568.671 us, +587.207 us), sd = 2.294 ms (CI deltas: -335.538 us, +446.633 us) WARNING: execution times have mild outliers, SD VALUES MAY BE INACCURATE
Exception
private static void test_rankFonts() throws Exception
rankFonts(charsFromManyLanguages):
font = java.awt.Font[family=Arial Unicode MS,name=Arial Unicode MS,style=plain,size=12], rank = 0.5940704345703125
font = java.awt.Font[family=Dialog,name=Dialog.bold,style=plain,size=12], rank = 0.565673828125
font = java.awt.Font[family=Dialog,name=Dialog.plain,style=plain,size=12], rank = 0.565673828125
font = java.awt.Font[family=SansSerif,name=SansSerif.bold,style=plain,size=12], rank = 0.565673828125
...
font = java.awt.Font[family=SimSun-PUA,name=SimSun-PUA,style=plain,size=12], rank = 0.0017547607421875
font = java.awt.Font[family=MT Extra,name=MT Extra,style=plain,size=12], rank = 9.765625E-4
font = java.awt.Font[family=Marlett,name=Marlett,style=plain,size=12], rank = 8.392333984375E-4
font = java.awt.Font[family=MS Outlook,name=MS Outlook,style=plain,size=12], rank = 5.035400390625E-4
Exception
private static void benchmark_rankFonts() throws Exception
rankFonts: first = 2.091 s, mean = 2.082 s (CI deltas: -969.569 us, +3.074 ms), sd = 6.229 ms (CI deltas: -4.050 ms, +7.450 ms) WARNING: EXECUTION TIMES HAVE EXTREME OUTLIERS, SD VALUES MAY BE INACCURATE
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |