C
Chris M. Thomasson
Here is the code:
http://clc.pastebin.com/RM3hyqVE
I am testing two algorithms here. One created by me, and the other created
by Edward Nilges. Here is the post where I gained the source of Edward's
algorithm:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/ad9fea19f2f7dd61
This is basically the same as my original automated sub-string search:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/38aee559668ee60c
except it generates a random exchange string and build an expected result
string. It then runs the source string through the given replacement
algorithm and checks to see if everything is Kosher.
So far, both Edwards algorithm and mine are passing 10,000,000 iterations.
That's quite a bit of randomly generated data. I cannot seem to find any
bugs in the algorithms as-is.
Anyway, I created this because I got sick and tired of manually generating
test cases!
;^)
http://clc.pastebin.com/RM3hyqVE
I am testing two algorithms here. One created by me, and the other created
by Edward Nilges. Here is the post where I gained the source of Edward's
algorithm:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/ad9fea19f2f7dd61
This is basically the same as my original automated sub-string search:
http://groups.google.com/group/comp.lang.c/browse_frm/thread/38aee559668ee60c
except it generates a random exchange string and build an expected result
string. It then runs the source string through the given replacement
algorithm and checks to see if everything is Kosher.
So far, both Edwards algorithm and mine are passing 10,000,000 iterations.
That's quite a bit of randomly generated data. I cannot seem to find any
bugs in the algorithms as-is.
Anyway, I created this because I got sick and tired of manually generating
test cases!
;^)