[forge-dev] JavaClassTest.testFormattingIsNotChanged fails on Windows

Lincoln Baxter, III lincolnbaxter at gmail.com
Thu Mar 15 15:42:13 EDT 2012


So you're saying that we should not try to make this OS specific?

In the end, this is a test, not running code, which does work fine.

~Lincoln

On Tue, Mar 13, 2012 at 7:20 PM, Ivan St. Ivanov
<ivan.st.ivanov at gmail.com>wrote:

> Hi folks,
>
> I was going to create a JIRA issue for this, but I didn't find where to
> click (probably I don't have permissions). Anyway... When I run the unit
> tests on Windows, I keep getting an error
> at JavaClassTest.testFormattingIsNotChanged. The issue is at this assertion:
>
>       assertTrue(output.contains(
>                "Telephone" + System.getProperty("line.separator") +
>                         "{"
>                ));
>
> On windows the line.separator system property resolves to \r\n. However,
> the output variable contains actually Telephone\n{. Which means that a \r
> is missing.
>
> I hoped I can resolve this by myself. However, the output variable is
> initialized by the JavaClass's toString() method. Which is actually
> implemented in the AbstractJavaSource class. And there it uses the Document
> and TextEdit classes that come from org.eclipse.jface.text
> and org.eclipse.text.edits packages respectively. Which is outside Forge.
>
> Does anybody have an idea how can we solve this? Of course we can change
> the test. But I'm afraid that the Forge-generated entities look really ugly
> on my machine. And I'm afraid that the reason is in this Eclipse library.
>
> Cheers,
> Ivan
>
> P.S. Just for the record, I'm running a 64-bit Windows 7.
>
> _______________________________________________
> forge-dev mailing list
> forge-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/forge-dev
>
>


-- 
Lincoln Baxter, III
http://ocpsoft.org
"Simpler is better."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/forge-dev/attachments/20120315/19e242e7/attachment.html 


More information about the forge-dev mailing list