Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[gmf-dev] Resolved Part of Bugzilla Bug 109178 org.eclipse.gmf.tests.runtime.common.core JUnits Are Failing


GMF Runtime Updates:  

Fixed org.eclipse.gmf.tests.runtime.common.core.internal.util.StringUtilTest, specifically the test for encodeURL().

As an example, the character © (Copyright) in a URL should be encoded as %C3%A9. The "©" is encoded in UTF-8 as two bytes C3 (hex) and A9 (hex), which are then written as the three characters "%c3" and "%a9" respectively.)
   
However, the tests for encodeURL had hard coded extended windows characters.

On Linux using the ANSI_X3.4_1968 character set used by the SUN JRE, the source Java file containing these extended characters get corrupted.

The correct solution is to use unicode notation in our source code, i.e. "\u00E9" rather than "©"

The remaining four JUnits failures depend on the "-ea" flag (enable assert) to be passed to the JRE.

For example, we have API tests for:

public void setCount(int count) {
  assert (count > 0);
  [snip]
}

Our API tests for setCount(0) thus depend on the asserts being enabled.

Hopefully you can make this change for us for the GMF build.

Contribution by:  Anthony Hunter

Reviewed by: Wayne Diu

Committed By : Anthony Hunter

Cheers...
Anthony
--
Anthony Hunter mailto:anthonyh@xxxxxxxxxx
Manager - Software Developer,
IBM Rational Software: Aurora Core Common / Modeling Tools
Phone: 613-591-7037

Back to the top