[Help] What is the best way to compare two forms for a sunit test?
Jerome Peace
peace_the_dreamer at yahoo.com
Mon Mar 5 06:52:45 UTC 2007
I have some code for which I have created graphical
tests .
These tests will produce a picture that looks right
when the code is working.
Now I want to (as lazily as possible) create unit
tests to prove the code and get it past the release
team watch dogs.
For each sample in the test I can get a form. Reduce
it to the smallest meaningful depth. So the next step
is to encode it into something that can be returned by
a method and compared with (what is hopefully) the
same form generated by the test.
What is the best way to do this?
I can anticipate this testing method coming up again.
It would be nice to automate the "encode it into a
method" part. At least to the point where I had
something that wrote the method (or most of it) into a
code holder or some text buffer I could copy.
For testing purposes it would be sufficient to test
the compressed forms (or even suitable hashes maybe).
Just as long as I could have confidence that the two
pictures matched.
I figure someone out there has probably tackled this
problem before so I am hoping to avoid reinventing the
wheel.
Yours in curiosity and service, --Jerome Peace
____________________________________________________________________________________
Do you Yahoo!?
Everyone is raving about the all-new Yahoo! Mail beta.
http://new.mail.yahoo.com
More information about the Squeak-dev
mailing list
|