Re: Re: Re: Best practices: how to unit test class file transformations?

Marcin Rzeźnicki <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
On Tue, May 31, 2011 at 3:26 PM, Andreas Sewe
<[email protected]> wrote:
> Hi Eugene,
>
>> I usually dump result of th tracing class adapter to string and compare
>> with expected result. After that it is a good idea to load and run
>> tranformed class and do that for various types affected by your
>> tranformation.
>
> yes, that's what I am currently doing as well. Its a very manual, ad-hoc
> approach, however. Thus, I was wondering whether someone has experience with
> a more test-driven approach to ASM.
>

Hi,
Probably you can just unit test your transformed class in the usual
way to see if it meets your expectation. If it loads, is verified and
does what's expected then you have correct transformation. If not you
can dump whatever you can (stack, bytecode etc) and make corrections.



-- 
Pozdrawiam
Marcin Rzeźnicki
message-footer.txt (text/plain, 238 B)
-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.