Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-dev] Issues with File.getAbsolutePath() and unit tests

I recently discovered that many of the unit tests in org.aspectj.ajdt.ajc.BuildArgParserTestCase and in org.aspectj.ajde.StructureModelTest are failing for me. These failures appear to be due to the behavior of File.getAbsolutePath(). My suspicion is that these failures are caused by recent changes to the structure model code to remove calls to File.getCanonicalPath().

These failures all come under Win XP using either jdk 1.4.2 or jdk 1.3.x from SUN. I'm running the tests from within eclipse, and have not set up my environment to run the build and test suite from the command-line. I don't have any more time this week to investigate this further, but next week I could probably get command-line build/test running to provide more info.

Here are the traces from two of the failures:

java.lang.IndexOutOfBoundsException: Index: 2, Size: 1
	at java.util.ArrayList.RangeCheck(ArrayList.java:486)
	at java.util.ArrayList.get(ArrayList.java:302)
at org.aspectj.ajde.StructureModelTest.testPointcutName(StructureModelTest.java:93)
-----------------------------------------
junit.framework.ComparisonFailure: expected:<c...> but was:<C...>
	at junit.framework.Assert.assertEquals(Assert.java:81)
	at junit.framework.Assert.assertEquals(Assert.java:87)
at org.aspectj.ajdt.ajc.BuildArgParserTestCase.testSourceRootDirWithFiles(BuildArgParserTestCase.java:221)

The filenames that are failing to compare above differ only in the initial capitalization of the 'c', e.g.
c:\aspectj\workspace\org.aspectj.ajdt.core\testdata\ajc\pkg
    and
C:\aspectj\workspace\org.aspectj.ajdt.core\testdata\ajc\pkg

I didn't submit this to bugzilla as I'm currently unsure whether this is a testing infrastructure issue or a bug in the actual code.

-Jim




Back to the top