summaryrefslogtreecommitdiff
path: root/fzytest.c
diff options
context:
space:
mode:
authorJohn Hawthorn <john.hawthorn@gmail.com>2014-08-03 23:55:33 -0700
committerJohn Hawthorn <john.hawthorn@gmail.com>2014-08-04 01:05:37 -0700
commit47317b330fb56374398e9ace36f7cebee2a39f90 (patch)
treeb0d22b62eed6cb00ab8723dadf1993d3bb5864ea /fzytest.c
parent0a24d45349af1f30abec2f716e65ccb411a4439c (diff)
Only M[0][0] should default to 0
Diffstat (limited to 'fzytest.c')
-rw-r--r--fzytest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/fzytest.c b/fzytest.c
index 7e16367..2d48e16 100644
--- a/fzytest.c
+++ b/fzytest.c
@@ -87,6 +87,15 @@ int test_positions_3(){
return 0;
}
+int test_positions_4(){
+ size_t positions[2];
+ match_positions("as", "examples.txt", positions);
+ assert(positions[0] == 2);
+ assert(positions[1] == 7);
+
+ return 0;
+}
+
int test_positions_exact(){
size_t positions[3];
match_positions("foo", "foo", positions);
@@ -110,6 +119,7 @@ int main(int argc, char *argv[]){
runtest(test_positions_1);
runtest(test_positions_2);
runtest(test_positions_3);
+ runtest(test_positions_4);
runtest(test_positions_exact);
summary();