Hi Jerome,
Thanks for your quick response.
I want to know about each individual tests like rc4test, rsatest,
shatest, etc. ,which is included in the test folder. What each test is
doing? What are they doing to verify the code?
Best Regards
Sajna Nazeer K
Associate Engineer - Broadcast BU
TATA ELXSI
Technopark Trivandrum 695 581 India
Tel +91 471 666 1238 Cell +91 95441 33419
_www.tataelxsi.com <http://www.tataelxsi.com/>_
On 9/14/2011 5:20 PM, Jerome Baum wrote:
Hi Sajnank,
On 2011-09-14 10:24, sajnank wrote:
I am using openssl-1.0.0 on Suse Linux. I want to know what is the
purpose of each application in the 'test' folder of the library? What
test they are doing?
They are automated tests. They test whether the code works as expected.
There are great introductions to automated testing around the Internet
and you may find some under "unit testing" (though more of a
sub-category of automated testing).
Consider a sorting function:
int sort(int size, char** array) { /* ... */ }
It's pretty easy to code that. But of course, humans err, and so you
would test your code. One way of testing the code is creating and
printing an array and then printing the apparently-sorted version.
Another way might be to log verbosely and watch the output of a proper
run of your program.
The "automated testing" approach would be to construct some input array
and the expected output array. Then, compare whether
array /* after running sort(length, array) */
and
expected_array
are equal. If they are not, that's called a "failed" test.
All make sense?
As I said, if you want a more in-depth introduction, get one of the
brilliant tutorials you can find online. I can also recommend the
Pragmatic Programmers book on unit testing.
- Jerome