You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Senaka Fernando (JIRA)" <ji...@apache.org> on 2008/07/20 01:21:31 UTC

[jira] Commented: (HARMONY-1456) [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on Harmony while RI returns false

    [ https://issues.apache.org/jira/browse/HARMONY-1456?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615059#action_12615059 ] 

Senaka Fernando commented on HARMONY-1456:
------------------------------------------

I now see the results as

RI: (java version 1.6.0)
===============================================
junit.framework.ComparisonFailure: expected:<[Dialog]> but was:<[Arial]>
        at junit.framework.Assert.assertEquals(Assert.java:81)
        at junit.framework.Assert.assertEquals(Assert.java:87)
        at test.testRun(test.java:14)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
===============================================

Harmony:
===============================================
junit.framework.ComparisonFailure: expected:<[Default]> but was:<[Arial]>
        at junit.framework.Assert.assertEquals(Assert.java:81)
        at junit.framework.Assert.assertEquals(Assert.java:87)
        at test.testRun(test.java:14)
        at java.lang.reflect.VMReflection.invokeMethod(VMReflection.java)
        at java.lang.reflect.Method.invoke(Method.java:317)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:120)
        at junit.framework.TestSuite.runTest(TestSuite.java:230)
        at junit.framework.TestSuite.run(TestSuite.java:225)
        at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
===============================================

I believe we don't have the same difference now. But there is a minor variant :)... Dialog vs. Default.

Regards,
Senaka

> [classlib][awt]java.awt.Font.hasUniformLineMetrics() return true on Harmony while RI returns false
> --------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-1456
>                 URL: https://issues.apache.org/jira/browse/HARMONY-1456
>             Project: Harmony
>          Issue Type: Bug
>          Components: Non-bug differences from RI
>         Environment: Windows XP
>            Reporter: Ilya Okomin
>            Priority: Trivial
>
> According to the specification method must Font.hasUniformLineMetrics return true if this Font has uniform
> line metrics; false otherwise.
> RI returns false for physical font "Arial" while Harmony returns true.
> ====================test.java====================
> import java.awt.*;
> import junit.framework.TestCase;
> public class test extends TestCase {
>     public void testRun() {
>         final String name = "Arial";
>         
>         Font f=new Font(name, Font.BOLD, 12);
>         
>         // Check if created font is physical, it's family name 
>         // is not logical and equals to the name parameter.
>         assertEquals(f.getFamily(), name);
>         assertTrue(f.hasUniformLineMetrics());                       
>     }
> }
> ===============================================
> Output:
> RI: java version "1.5.0"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
> BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75, GC: System optimized over throughput (initial strategy singleparpar))
> junit.framework.AssertionFailedError
> 	at junit.framework.Assert.fail(Assert.java:47)
> 	at junit.framework.Assert.assertTrue(Assert.java:20)
> 	at junit.framework.Assert.assertTrue(Assert.java:27)
> 	at test.testRun(Test9688.java:17)
> 	at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
> 	at java.lang.reflect.Method.invoke(Ljava.lang.Object;[Ljava.lang.Object;I)Ljava.lang.Object;(Unknown Source)
> 	at junit.framework.TestCase.runTest(TestCase.java:154)
> 	at junit.framework.TestCase.runBare(TestCase.java:127)
> 	at junit.framework.TestResult$1.protect(TestResult.java:106)
> 	at junit.framework.TestResult.runProtected(TestResult.java:124)
> 	at junit.framework.TestResult.run(TestResult.java:109)
> 	at junit.framework.TestCase.run(TestCase.java:118)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:208)
> 	at junit.framework.TestSuite.run(TestSuite.java:203)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
> 	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> Harmony: java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r431938, (Aug 16 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> // test passed!
> I would suppose that it is RI bug, since spec says: " If the logical Font is a single font then the metrics would be uniform." In this case we have "Arial" font that is a single physical font on Windows platform and according to spec it has to have uniform metrics.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.