Hrily / LibGraph

Graph Library for C++
MIT License
0 stars 1 forks source link

Add Unit Testing each and every function in the code #5

Open sbshah97 opened 7 years ago

sbshah97 commented 7 years ago
Sasasu commented 7 years ago

Hello, I would like to contribute to this. Could I ask which build system the test will use? Can I just write Makefile by hand? And what is the "passing one Unit Test and failing one Unit Test" format? Is that means give one illegal input which can make an exception and then give one legal input?

sbshah97 commented 7 years ago

@Sasasu check out CPPUnit Test for writing tests.

And what is the "passing one Unit Test and failing one Unit Test" format?
Is that means give one illegal input which can make an exception and then give one legal input?

Yes basically we need to check if all exceptions and corner cases are handled or not and the program doesn't crash when an illegal input is given!

Sasasu commented 7 years ago

Hello, I have finish test-graph.h to test graph. When I am willing to start writing test-tree.h, it makes me confused. and the test minimumSpanningTree always failed.

tree.h#L50 what is the s for? and Tree::addEdge have a very high complexity, it runs hasCycle every time ...

I will send a pull request soon.

sbshah97 commented 7 years ago

Any doubts yet? @Hrily