file not found in JUnit failure trace [message #36754] |
Thu, 27 May 2004 10:45  |
Eclipse User |
|
|
|
I was writing a few JUnit testcases for a project that contains a
couple of aspects.
One of them fails and while trying to understand why I noticed that
clicking on lines in the stacktrace, which refer to aspectj-code,
e.g.:
-----------------------------
....
at foo.Log.createSignature(Log.aj:62)
....
-----------------------------
yields a strange message:
"Test class not found in selected project."
I have no class called "Test" in my project. I guess JUnit has a
Test-class one, but I don't know why clicking on the above line in the
stacktrace searches for that. Shouldn't it show line 62 in file
Log.aj?
BTW: Clicking on certain other lines, e.g.
-----------------------------
....
at
foo.Log.ajc$inlineAccessMethod$foo_Log$foo_Log$createSignatu re(Log.aj)
....
-----------------------------
yields no reaction at all, i.e. it seems to be ignored completey
(which is probably OK since that seems to be some very aspect-internal
stuff...).
Michael
|
|
|
Re: file not found in JUnit failure trace [message #36788 is a reply to message #36754] |
Thu, 27 May 2004 10:58  |
Eclipse User |
|
|
|
It also seems, that if one added methods to a class using an aspect
like:
-----------------
public aspect Xyz {
....
declare parents: Foo implements Bar;
// implementing some method defined by Bar:
public String bar() {
...
}
....
}
-----------------
then the line in the stacktrace erroneously points to the advised
original class anddoes not contain a line number, e.g.:
-----------------
.....
at foo.Foo.bar(Foo.java)
.....
-----------------
instead of :
-----------------
.....
at Xyz.bar(Xyz.aj:123)
.....
-----------------
I guess when it comes to stacktrace reverse translation this whole
bytecode weaving opens not just one but several cans of worms...
Michael
|
|
|
Re: file not found in JUnit failure trace [message #580241 is a reply to message #36754] |
Thu, 27 May 2004 10:58  |
Eclipse User |
|
|
|
It also seems, that if one added methods to a class using an aspect
like:
-----------------
public aspect Xyz {
....
declare parents: Foo implements Bar;
// implementing some method defined by Bar:
public String bar() {
...
}
....
}
-----------------
then the line in the stacktrace erroneously points to the advised
original class anddoes not contain a line number, e.g.:
-----------------
.....
at foo.Foo.bar(Foo.java)
.....
-----------------
instead of :
-----------------
.....
at Xyz.bar(Xyz.aj:123)
.....
-----------------
I guess when it comes to stacktrace reverse translation this whole
bytecode weaving opens not just one but several cans of worms...
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.04333 seconds