joshids / markdownsharp

Automatically exported from code.google.com/p/markdownsharp
0 stars 0 forks source link

Additional unit tests #50

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
I ran code coverage over your default test suite, and found a few holes in 
corner cases.  I have patches for some of those:

1. Not testing the empty-string case (Transform with null/empty)
2. Handling reference links with bold/italic titles wasn't tested
3. Handling images with empty link ids wasn't tested
4. Handling images with invalid link ids wasn't tested
5. Some normalization/special character cases weren't completely tested (sub 
character, carriage return at end of file)

I also saw the options/config file stuff and options constructor aren't covered 
at all by default.  Maybe this is by design?  I didn't try out the tests you 
have.

And a minor code issue found by examining coverage:

1. LinkEvaluator checks for null in the matches returned - is this necessary?  
I'm getting partial coverage on it because of that.  I don't think other match 
evaluators check for null.  Or if it is necessary, maybe other ones should too?

Original issue reported on code.google.com by kav...@gmail.com on 7 Nov 2011 at 10:37

Attachments: