diff --git a/fuzz/fuzz-fuzz.zip b/fuzz/fuzz-fuzz.zip deleted file mode 100644 index 04e2bcb..0000000 Binary files a/fuzz/fuzz-fuzz.zip and /dev/null differ diff --git a/fuzz/fuzz.go b/fuzz/fuzz.go deleted file mode 100644 index fbd822e..0000000 --- a/fuzz/fuzz.go +++ /dev/null @@ -1,26 +0,0 @@ -package fuzz - -import ( - "strings" - - "github.com/agnivade/levenshtein" -) - -func Fuzz(data []byte) int { - str := string(data) - if len(str) == 0 { - return -1 - } - parts := strings.Split(str, "\n") - if len(parts) != 2 { - return -1 - } - s1 := parts[0] - s2 := parts[1] - res := levenshtein.ComputeDistance(s1, s2) - // definitely an error. - if res < 0 || res > len(s1) || res > len(s2) { - return 0 - } - return 1 -} diff --git a/fuzz/workdir/corpus/02d3067d823a82740c63b7059461563d8104f513-7 b/fuzz/workdir/corpus/02d3067d823a82740c63b7059461563d8104f513-7 deleted file mode 100644 index 8363bd7..0000000 --- a/fuzz/workdir/corpus/02d3067d823a82740c63b7059461563d8104f513-7 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/0324136bd592f82a0afb39d3eb7870d06e326c0d b/fuzz/workdir/corpus/0324136bd592f82a0afb39d3eb7870d06e326c0d deleted file mode 100644 index de9c523..0000000 --- a/fuzz/workdir/corpus/0324136bd592f82a0afb39d3eb7870d06e326c0d +++ /dev/null @@ -1,2 +0,0 @@ -o -jT577aehB_q_f_Q_a_ezU_6o6i8p_a09QWj9j_b_PUoA4UKw5_13DZuz_99 \ No newline at end of file diff --git a/fuzz/workdir/corpus/074f89df5a73e41baa865cbaa626b8004a4df175-2 b/fuzz/workdir/corpus/074f89df5a73e41baa865cbaa626b8004a4df175-2 deleted file mode 100644 index 338d9ea..0000000 --- a/fuzz/workdir/corpus/074f89df5a73e41baa865cbaa626b8004a4df175-2 +++ /dev/null @@ -1 +0,0 @@ -6 diff --git a/fuzz/workdir/corpus/0978a4e12acb2729d6a6a444c105e5dc6a8f9b6d-6 b/fuzz/workdir/corpus/0978a4e12acb2729d6a6a444c105e5dc6a8f9b6d-6 deleted file mode 100644 index 46f7f50..0000000 --- a/fuzz/workdir/corpus/0978a4e12acb2729d6a6a444c105e5dc6a8f9b6d-6 +++ /dev/null @@ -1 +0,0 @@ -􂼋 diff --git a/fuzz/workdir/corpus/0caae8606329909881e38ca9a6a7fda03743d69a-2 b/fuzz/workdir/corpus/0caae8606329909881e38ca9a6a7fda03743d69a-2 deleted file mode 100644 index 6732963..0000000 --- a/fuzz/workdir/corpus/0caae8606329909881e38ca9a6a7fda03743d69a-2 +++ /dev/null @@ -1,2 +0,0 @@ -O__V4Thql_118_9_5597_8q154__x_14nBRtr -_pczF25N8__k39KsdTIdULyMB_4Z9_V_U_tnGs \ No newline at end of file diff --git a/fuzz/workdir/corpus/0cfe6afdfd93150eae89a00e696c9d234526ea61-2 b/fuzz/workdir/corpus/0cfe6afdfd93150eae89a00e696c9d234526ea61-2 deleted file mode 100644 index 12b22fd..0000000 --- a/fuzz/workdir/corpus/0cfe6afdfd93150eae89a00e696c9d234526ea61-2 +++ /dev/null @@ -1 +0,0 @@ -།་གམ་འ།་གམ་འས་པ་་མས་པ་་མ། diff --git a/fuzz/workdir/corpus/1 b/fuzz/workdir/corpus/1 deleted file mode 100644 index 7c74e4c..0000000 --- a/fuzz/workdir/corpus/1 +++ /dev/null @@ -1,2 +0,0 @@ - -hello \ No newline at end of file diff --git a/fuzz/workdir/corpus/143c1b5aa6305fa326dc5635a5b4bcc0a1979212-7 b/fuzz/workdir/corpus/143c1b5aa6305fa326dc5635a5b4bcc0a1979212-7 deleted file mode 100644 index c524a99..0000000 --- a/fuzz/workdir/corpus/143c1b5aa6305fa326dc5635a5b4bcc0a1979212-7 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/1a5999be3c9f92b2936c08ad434ca2a83ecd9575-7 b/fuzz/workdir/corpus/1a5999be3c9f92b2936c08ad434ca2a83ecd9575-7 deleted file mode 100644 index c74a96a..0000000 --- a/fuzz/workdir/corpus/1a5999be3c9f92b2936c08ad434ca2a83ecd9575-7 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/1d172d7b44ca84d05f5fa7b6eb98f1955af0b948-2 b/fuzz/workdir/corpus/1d172d7b44ca84d05f5fa7b6eb98f1955af0b948-2 deleted file mode 100644 index abcce60..0000000 --- a/fuzz/workdir/corpus/1d172d7b44ca84d05f5fa7b6eb98f1955af0b948-2 +++ /dev/null @@ -1 +0,0 @@ -þj diff --git a/fuzz/workdir/corpus/2 b/fuzz/workdir/corpus/2 deleted file mode 100644 index ce01362..0000000 --- a/fuzz/workdir/corpus/2 +++ /dev/null @@ -1 +0,0 @@ -hello diff --git a/fuzz/workdir/corpus/211cddcccb89f3902c05a4434ce511b0d8e81757-12 b/fuzz/workdir/corpus/211cddcccb89f3902c05a4434ce511b0d8e81757-12 deleted file mode 100644 index fa9dad5..0000000 --- a/fuzz/workdir/corpus/211cddcccb89f3902c05a4434ce511b0d8e81757-12 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/231203f44c16349024c8b90d1f35c9740828563c-6 b/fuzz/workdir/corpus/231203f44c16349024c8b90d1f35c9740828563c-6 deleted file mode 100644 index 4530ea8..0000000 --- a/fuzz/workdir/corpus/231203f44c16349024c8b90d1f35c9740828563c-6 +++ /dev/null @@ -1 +0,0 @@ -ʋϛܑ diff --git a/fuzz/workdir/corpus/23d54ac1dac456100388367a829508a62752ddd9 b/fuzz/workdir/corpus/23d54ac1dac456100388367a829508a62752ddd9 deleted file mode 100644 index a11daff..0000000 --- a/fuzz/workdir/corpus/23d54ac1dac456100388367a829508a62752ddd9 +++ /dev/null @@ -1,2 +0,0 @@ -y_or_R_qNZ__08ji8KfXpM_M2__5__f_7N_1_1_byLOZK97hr85CGw_Le3OE4i0X2Ujs__n_Fr___g9u___r_6_k____JBI -___ \ No newline at end of file diff --git a/fuzz/workdir/corpus/23dd9f1cf3648138e68552009d8d7affd7868096 b/fuzz/workdir/corpus/23dd9f1cf3648138e68552009d8d7affd7868096 deleted file mode 100644 index 7a2d97e..0000000 --- a/fuzz/workdir/corpus/23dd9f1cf3648138e68552009d8d7affd7868096 +++ /dev/null @@ -1,2 +0,0 @@ -Hafþr Jlus Bjrnsson -Hafþor Julius Bjornsson \ No newline at end of file diff --git a/fuzz/workdir/corpus/2523a44c4ad219448cd523dacfbc8a06137812da-10 b/fuzz/workdir/corpus/2523a44c4ad219448cd523dacfbc8a06137812da-10 deleted file mode 100644 index a1d26d7..0000000 --- a/fuzz/workdir/corpus/2523a44c4ad219448cd523dacfbc8a06137812da-10 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/297739bb43046bfb992b154cbe826fb0ac503b84-6 b/fuzz/workdir/corpus/297739bb43046bfb992b154cbe826fb0ac503b84-6 deleted file mode 100644 index 50ee4d2..0000000 --- a/fuzz/workdir/corpus/297739bb43046bfb992b154cbe826fb0ac503b84-6 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/2a478b73ab0a1a261ad4db6db9acc5efbb4f8cf2-5 b/fuzz/workdir/corpus/2a478b73ab0a1a261ad4db6db9acc5efbb4f8cf2-5 deleted file mode 100644 index 567562d..0000000 --- a/fuzz/workdir/corpus/2a478b73ab0a1a261ad4db6db9acc5efbb4f8cf2-5 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/2dd5883dbb82c514dbdce15feaa4e7dbf1bb5ef1-3 b/fuzz/workdir/corpus/2dd5883dbb82c514dbdce15feaa4e7dbf1bb5ef1-3 deleted file mode 100644 index e56d6e8..0000000 --- a/fuzz/workdir/corpus/2dd5883dbb82c514dbdce15feaa4e7dbf1bb5ef1-3 +++ /dev/null @@ -1 +0,0 @@ -།་གམ་འ།་གམ་འས་པ་་མས༂མ་འ།་གམ་འས་པ་་མས་པ་་མ་པ་་མ། diff --git a/fuzz/workdir/corpus/2dfc72725932e077c3fffc93614b63fedb334104-4 b/fuzz/workdir/corpus/2dfc72725932e077c3fffc93614b63fedb334104-4 deleted file mode 100644 index 7b552ae..0000000 --- a/fuzz/workdir/corpus/2dfc72725932e077c3fffc93614b63fedb334104-4 +++ /dev/null @@ -1 +0,0 @@ -ζ diff --git a/fuzz/workdir/corpus/2ebcabb82455bf0c76426c04431cc8599cf827fd-3 b/fuzz/workdir/corpus/2ebcabb82455bf0c76426c04431cc8599cf827fd-3 deleted file mode 100644 index e5d83c1..0000000 --- a/fuzz/workdir/corpus/2ebcabb82455bf0c76426c04431cc8599cf827fd-3 +++ /dev/null @@ -1 +0,0 @@ -j diff --git a/fuzz/workdir/corpus/3 b/fuzz/workdir/corpus/3 deleted file mode 100644 index 6ca24bb..0000000 --- a/fuzz/workdir/corpus/3 +++ /dev/null @@ -1,2 +0,0 @@ -hello -hello \ No newline at end of file diff --git a/fuzz/workdir/corpus/30659ffa771fabbc69026b73cfe786b5e0ca5f26-11 b/fuzz/workdir/corpus/30659ffa771fabbc69026b73cfe786b5e0ca5f26-11 deleted file mode 100644 index 98ba31f..0000000 --- a/fuzz/workdir/corpus/30659ffa771fabbc69026b73cfe786b5e0ca5f26-11 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/32fa17ebb0a4849a2e5bb021a6cc35f23bcf9331-3 b/fuzz/workdir/corpus/32fa17ebb0a4849a2e5bb021a6cc35f23bcf9331-3 deleted file mode 100644 index 7a31598..0000000 --- a/fuzz/workdir/corpus/32fa17ebb0a4849a2e5bb021a6cc35f23bcf9331-3 +++ /dev/null @@ -1 +0,0 @@ -ú˶ diff --git a/fuzz/workdir/corpus/349599e8245643624aaa86bc2db2a33becfa9352 b/fuzz/workdir/corpus/349599e8245643624aaa86bc2db2a33becfa9352 deleted file mode 100644 index fe2d5d0..0000000 --- a/fuzz/workdir/corpus/349599e8245643624aaa86bc2db2a33becfa9352 +++ /dev/null @@ -1,2 +0,0 @@ -u__ew_Ozr2466Gis_UeM5j__JBGv_u2____xc_0gL22_6S_1_x__UAzTQ__G8W_9_J6P1ZBfo_tFC -_ne6h61eO3Nqo_70K9M_T_5Qu_liRzQG__8j_49EyOOeH____9eQ__W_d270mAm__co_GTv___eCx \ No newline at end of file diff --git a/fuzz/workdir/corpus/3cad5775d675998b8ab336b932fcbb9cf91ba8a2-2 b/fuzz/workdir/corpus/3cad5775d675998b8ab336b932fcbb9cf91ba8a2-2 deleted file mode 100644 index 77d93b1..0000000 --- a/fuzz/workdir/corpus/3cad5775d675998b8ab336b932fcbb9cf91ba8a2-2 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/3da3ecec6aab6274045f9f3e23e19ae2069ae79c-7 b/fuzz/workdir/corpus/3da3ecec6aab6274045f9f3e23e19ae2069ae79c-7 deleted file mode 100644 index e646ef7..0000000 --- a/fuzz/workdir/corpus/3da3ecec6aab6274045f9f3e23e19ae2069ae79c-7 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋 diff --git a/fuzz/workdir/corpus/3dac91d65298bea69c9a3b6f971a65417e415a97-6 b/fuzz/workdir/corpus/3dac91d65298bea69c9a3b6f971a65417e415a97-6 deleted file mode 100644 index 88aa7c4..0000000 --- a/fuzz/workdir/corpus/3dac91d65298bea69c9a3b6f971a65417e415a97-6 +++ /dev/null @@ -1 +0,0 @@ -˶˶˶Øߺ˘ߺ˶˶˶˶Øߺ˘ߺ˶˶ diff --git a/fuzz/workdir/corpus/3f679dfa4df298b22ec4adf0a8c86bd3c5f4f245-14 b/fuzz/workdir/corpus/3f679dfa4df298b22ec4adf0a8c86bd3c5f4f245-14 deleted file mode 100644 index 1af55c5..0000000 --- a/fuzz/workdir/corpus/3f679dfa4df298b22ec4adf0a8c86bd3c5f4f245-14 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/4 b/fuzz/workdir/corpus/4 deleted file mode 100644 index 89f2fdd..0000000 --- a/fuzz/workdir/corpus/4 +++ /dev/null @@ -1,2 +0,0 @@ -ab -aa \ No newline at end of file diff --git a/fuzz/workdir/corpus/4b0b5502501b78ad0ea0cd61eee1bc0663076598-1 b/fuzz/workdir/corpus/4b0b5502501b78ad0ea0cd61eee1bc0663076598-1 deleted file mode 100644 index 8e10753..0000000 --- a/fuzz/workdir/corpus/4b0b5502501b78ad0ea0cd61eee1bc0663076598-1 +++ /dev/null @@ -1,2 +0,0 @@ - -__V4Thql_118_9_5597_8q154__x_14nBRtrO_p__czVF25N8__k39KsdTIZM4B_4Z9_V_U_tnGs4C_Ra6v_09GR0_ \ No newline at end of file diff --git a/fuzz/workdir/corpus/4f2f894b6ff5427d668bd67a9494b7c526365e35-15 b/fuzz/workdir/corpus/4f2f894b6ff5427d668bd67a9494b7c526365e35-15 deleted file mode 100644 index 7bd2797..0000000 --- a/fuzz/workdir/corpus/4f2f894b6ff5427d668bd67a9494b7c526365e35-15 +++ /dev/null @@ -1 +0,0 @@ -􂂬􂂬 diff --git a/fuzz/workdir/corpus/5 b/fuzz/workdir/corpus/5 deleted file mode 100644 index 055cc15..0000000 --- a/fuzz/workdir/corpus/5 +++ /dev/null @@ -1,2 +0,0 @@ -ab -aaa \ No newline at end of file diff --git a/fuzz/workdir/corpus/5c7f92485632689b964686e25aad22d7fa73e177-5 b/fuzz/workdir/corpus/5c7f92485632689b964686e25aad22d7fa73e177-5 deleted file mode 100644 index 42c0c14..0000000 --- a/fuzz/workdir/corpus/5c7f92485632689b964686e25aad22d7fa73e177-5 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/5e9c16b12028cccd7cbcb4fabec8c1d734923bcd-12 b/fuzz/workdir/corpus/5e9c16b12028cccd7cbcb4fabec8c1d734923bcd-12 deleted file mode 100644 index 4c18993..0000000 --- a/fuzz/workdir/corpus/5e9c16b12028cccd7cbcb4fabec8c1d734923bcd-12 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/6 b/fuzz/workdir/corpus/6 deleted file mode 100644 index 223363c..0000000 --- a/fuzz/workdir/corpus/6 +++ /dev/null @@ -1,2 +0,0 @@ -levenshtein -frankenstein \ No newline at end of file diff --git a/fuzz/workdir/corpus/60c71414d2a76b5ab37fa47ec6a659dc7036a1ce-5 b/fuzz/workdir/corpus/60c71414d2a76b5ab37fa47ec6a659dc7036a1ce-5 deleted file mode 100644 index 738db31..0000000 --- a/fuzz/workdir/corpus/60c71414d2a76b5ab37fa47ec6a659dc7036a1ce-5 +++ /dev/null @@ -1 +0,0 @@ -Øߺ˶˶˶ diff --git a/fuzz/workdir/corpus/68091940b697d32a87f41c5bb7734508b5134204-5 b/fuzz/workdir/corpus/68091940b697d32a87f41c5bb7734508b5134204-5 deleted file mode 100644 index 1d9e42a..0000000 --- a/fuzz/workdir/corpus/68091940b697d32a87f41c5bb7734508b5134204-5 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/6d8c331f4601e2fc8f22bd9d451079228e8eae21-7 b/fuzz/workdir/corpus/6d8c331f4601e2fc8f22bd9d451079228e8eae21-7 deleted file mode 100644 index 0b1e688..0000000 --- a/fuzz/workdir/corpus/6d8c331f4601e2fc8f22bd9d451079228e8eae21-7 +++ /dev/null @@ -1 +0,0 @@ -Øߺ˘ߋ˶Øߺ˘ߺ˶˶˶˶˶Øߺ˘ߺ˶˶˶˶Øߺ˘߶˶Øߺ˘ߺ˶˶ diff --git a/fuzz/workdir/corpus/6eb53008a29273c45248094af9e4c14a684630a3-5 b/fuzz/workdir/corpus/6eb53008a29273c45248094af9e4c14a684630a3-5 deleted file mode 100644 index 2eaf2ab..0000000 --- a/fuzz/workdir/corpus/6eb53008a29273c45248094af9e4c14a684630a3-5 +++ /dev/null @@ -1 +0,0 @@ -˶˶˶Øߺ˘ߺ˶˶ diff --git a/fuzz/workdir/corpus/7 b/fuzz/workdir/corpus/7 deleted file mode 100644 index 6aa2735..0000000 --- a/fuzz/workdir/corpus/7 +++ /dev/null @@ -1,2 +0,0 @@ -Hafþór Júlíus Björnsson -Hafþor Julius Bjornsson \ No newline at end of file diff --git a/fuzz/workdir/corpus/73e77945ac6bbd78709edd1a0f44551985b9d063-6 b/fuzz/workdir/corpus/73e77945ac6bbd78709edd1a0f44551985b9d063-6 deleted file mode 100644 index 42ff91f..0000000 --- a/fuzz/workdir/corpus/73e77945ac6bbd78709edd1a0f44551985b9d063-6 +++ /dev/null @@ -1 +0,0 @@ -öߺ˻˶ˆڶ diff --git a/fuzz/workdir/corpus/7b3153cc73c298f3535fa87821ffc53bf95456d5-7 b/fuzz/workdir/corpus/7b3153cc73c298f3535fa87821ffc53bf95456d5-7 deleted file mode 100644 index e8f4746..0000000 --- a/fuzz/workdir/corpus/7b3153cc73c298f3535fa87821ffc53bf95456d5-7 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/7f7e21abc739a3e68768bcd16b419711c8fd20ac-9 b/fuzz/workdir/corpus/7f7e21abc739a3e68768bcd16b419711c8fd20ac-9 deleted file mode 100644 index 14b1c71..0000000 --- a/fuzz/workdir/corpus/7f7e21abc739a3e68768bcd16b419711c8fd20ac-9 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/7fe56fb4ac7c5a0bdea3546ec7c57cd3aea89aa3-14 b/fuzz/workdir/corpus/7fe56fb4ac7c5a0bdea3546ec7c57cd3aea89aa3-14 deleted file mode 100644 index 073347c..0000000 --- a/fuzz/workdir/corpus/7fe56fb4ac7c5a0bdea3546ec7c57cd3aea89aa3-14 +++ /dev/null @@ -1 +0,0 @@ -@ diff --git a/fuzz/workdir/corpus/8 b/fuzz/workdir/corpus/8 deleted file mode 100644 index 93dab12..0000000 --- a/fuzz/workdir/corpus/8 +++ /dev/null @@ -1,2 +0,0 @@ -།་གམ་འས་པ་་མ། -།་གམའས་པ་་མ \ No newline at end of file diff --git a/fuzz/workdir/corpus/8101b7903aacbad63ff955cd385ee8bd0cef1484-1 b/fuzz/workdir/corpus/8101b7903aacbad63ff955cd385ee8bd0cef1484-1 deleted file mode 100644 index 62b0df1..0000000 --- a/fuzz/workdir/corpus/8101b7903aacbad63ff955cd385ee8bd0cef1484-1 +++ /dev/null @@ -1 +0,0 @@ -Hafþr Jlus Bjrnsson diff --git a/fuzz/workdir/corpus/8625b4e98301e735464e765ec2366f00f1845fb1-1 b/fuzz/workdir/corpus/8625b4e98301e735464e765ec2366f00f1845fb1-1 deleted file mode 100644 index 5dc8a93..0000000 --- a/fuzz/workdir/corpus/8625b4e98301e735464e765ec2366f00f1845fb1-1 +++ /dev/null @@ -1 +0,0 @@ -།་གམ་འས་པ་་མ། diff --git a/fuzz/workdir/corpus/866b304a67e765d13301a0464a276fc311417a63-4 b/fuzz/workdir/corpus/866b304a67e765d13301a0464a276fc311417a63-4 deleted file mode 100644 index 7d97a14..0000000 --- a/fuzz/workdir/corpus/866b304a67e765d13301a0464a276fc311417a63-4 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/868f5ee0b9ea0a4a1cf7b5317fb2d29e97a90187-2 b/fuzz/workdir/corpus/868f5ee0b9ea0a4a1cf7b5317fb2d29e97a90187-2 deleted file mode 100644 index 1b67653..0000000 --- a/fuzz/workdir/corpus/868f5ee0b9ea0a4a1cf7b5317fb2d29e97a90187-2 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/89d5dc99a85134c22f2c6d5e401e71f88726f7c8-8 b/fuzz/workdir/corpus/89d5dc99a85134c22f2c6d5e401e71f88726f7c8-8 deleted file mode 100644 index 2e271d9..0000000 --- a/fuzz/workdir/corpus/89d5dc99a85134c22f2c6d5e401e71f88726f7c8-8 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/8a1bd4fb22218af74a5cedbbcb2eb7a5c3004978-6 b/fuzz/workdir/corpus/8a1bd4fb22218af74a5cedbbcb2eb7a5c3004978-6 deleted file mode 100644 index c5f1d08..0000000 --- a/fuzz/workdir/corpus/8a1bd4fb22218af74a5cedbbcb2eb7a5c3004978-6 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/8df83dd3e3b3860c808d331094a096ee59cd00c8-13 b/fuzz/workdir/corpus/8df83dd3e3b3860c808d331094a096ee59cd00c8-13 deleted file mode 100644 index bec3962..0000000 --- a/fuzz/workdir/corpus/8df83dd3e3b3860c808d331094a096ee59cd00c8-13 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/91c9ade5344ba749f32aed600be77179acfb980e-4 b/fuzz/workdir/corpus/91c9ade5344ba749f32aed600be77179acfb980e-4 deleted file mode 100644 index 4e2430d..0000000 --- a/fuzz/workdir/corpus/91c9ade5344ba749f32aed600be77179acfb980e-4 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/979cf343d489f37a7224f02fa9dbf164a81bd294-7 b/fuzz/workdir/corpus/979cf343d489f37a7224f02fa9dbf164a81bd294-7 deleted file mode 100644 index 0259eb4..0000000 --- a/fuzz/workdir/corpus/979cf343d489f37a7224f02fa9dbf164a81bd294-7 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/97bb9e7e9c8b84ef8160890b7b58671df127133a-6 b/fuzz/workdir/corpus/97bb9e7e9c8b84ef8160890b7b58671df127133a-6 deleted file mode 100644 index 297b571..0000000 --- a/fuzz/workdir/corpus/97bb9e7e9c8b84ef8160890b7b58671df127133a-6 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/98023c21cd4c8074c366f830a5e984a030ccf992-10 b/fuzz/workdir/corpus/98023c21cd4c8074c366f830a5e984a030ccf992-10 deleted file mode 100644 index dcd03cf..0000000 --- a/fuzz/workdir/corpus/98023c21cd4c8074c366f830a5e984a030ccf992-10 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/9bdec209c35bee56e4ec365fb3707b990577f9d3-9 b/fuzz/workdir/corpus/9bdec209c35bee56e4ec365fb3707b990577f9d3-9 deleted file mode 100644 index 813666c..0000000 --- a/fuzz/workdir/corpus/9bdec209c35bee56e4ec365fb3707b990577f9d3-9 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/a0226b71a5e63726d19ae4a411b80c1427900d20-5 b/fuzz/workdir/corpus/a0226b71a5e63726d19ae4a411b80c1427900d20-5 deleted file mode 100644 index 337601e..0000000 --- a/fuzz/workdir/corpus/a0226b71a5e63726d19ae4a411b80c1427900d20-5 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/bac1763b2d860d829ca392333be9ac24f084da6f-4 b/fuzz/workdir/corpus/bac1763b2d860d829ca392333be9ac24f084da6f-4 deleted file mode 100644 index bf84736..0000000 --- a/fuzz/workdir/corpus/bac1763b2d860d829ca392333be9ac24f084da6f-4 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/bdac564b9fd7febe1f3444717c2863efc521c7df-8 b/fuzz/workdir/corpus/bdac564b9fd7febe1f3444717c2863efc521c7df-8 deleted file mode 100644 index ff7e6e0..0000000 --- a/fuzz/workdir/corpus/bdac564b9fd7febe1f3444717c2863efc521c7df-8 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/c0f39d96153c35f514c22015e38fc44419045021-5 b/fuzz/workdir/corpus/c0f39d96153c35f514c22015e38fc44419045021-5 deleted file mode 100644 index d20fe84..0000000 --- a/fuzz/workdir/corpus/c0f39d96153c35f514c22015e38fc44419045021-5 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/c8ed62f848a4a3e6ef9e4d1e904126f45cc329bc-3 b/fuzz/workdir/corpus/c8ed62f848a4a3e6ef9e4d1e904126f45cc329bc-3 deleted file mode 100644 index 6f09c8f..0000000 --- a/fuzz/workdir/corpus/c8ed62f848a4a3e6ef9e4d1e904126f45cc329bc-3 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/cd1f06e47d4e6322a8e7923a820162ffcc73dde9-3 b/fuzz/workdir/corpus/cd1f06e47d4e6322a8e7923a820162ffcc73dde9-3 deleted file mode 100644 index 4e4f423..0000000 --- a/fuzz/workdir/corpus/cd1f06e47d4e6322a8e7923a820162ffcc73dde9-3 +++ /dev/null @@ -1 +0,0 @@ -། diff --git a/fuzz/workdir/corpus/cdb7c2f5f650df63f1b1fb473eec689ef109f116-11 b/fuzz/workdir/corpus/cdb7c2f5f650df63f1b1fb473eec689ef109f116-11 deleted file mode 100644 index c0f3acd..0000000 --- a/fuzz/workdir/corpus/cdb7c2f5f650df63f1b1fb473eec689ef109f116-11 +++ /dev/null @@ -1 +0,0 @@ -􂼋􂼋􂼋􂼋􂼋􂼋 diff --git a/fuzz/workdir/corpus/def9963bd2999c059d0e0a0c67dba61e7feff43a-1 b/fuzz/workdir/corpus/def9963bd2999c059d0e0a0c67dba61e7feff43a-1 deleted file mode 100644 index bde185f..0000000 --- a/fuzz/workdir/corpus/def9963bd2999c059d0e0a0c67dba61e7feff43a-1 +++ /dev/null @@ -1,2 +0,0 @@ - -jT577aehB_q_f_Q_a_ezU_6o6i8p_a09QWj9j_b_PUoA4UKw5_13DZuz_99 \ No newline at end of file diff --git a/fuzz/workdir/corpus/df3139e37900af6366fb04332c92d2c19d930bb7-16 b/fuzz/workdir/corpus/df3139e37900af6366fb04332c92d2c19d930bb7-16 deleted file mode 100644 index 5969e3c..0000000 Binary files a/fuzz/workdir/corpus/df3139e37900af6366fb04332c92d2c19d930bb7-16 and /dev/null differ diff --git a/fuzz/workdir/corpus/e11d22bb9287e17c26f10b826ab47a7cf49bd706 b/fuzz/workdir/corpus/e11d22bb9287e17c26f10b826ab47a7cf49bd706 deleted file mode 100644 index 2f63a68..0000000 --- a/fuzz/workdir/corpus/e11d22bb9287e17c26f10b826ab47a7cf49bd706 +++ /dev/null @@ -1,2 +0,0 @@ - -h \ No newline at end of file diff --git a/fuzz/workdir/corpus/e92e35c6a2968a0a82b3db61ca7f285130c6543f-3 b/fuzz/workdir/corpus/e92e35c6a2968a0a82b3db61ca7f285130c6543f-3 deleted file mode 100644 index 0be685e..0000000 --- a/fuzz/workdir/corpus/e92e35c6a2968a0a82b3db61ca7f285130c6543f-3 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/eb462902b0411b260af271b86787cfb8d393bb3e-4 b/fuzz/workdir/corpus/eb462902b0411b260af271b86787cfb8d393bb3e-4 deleted file mode 100644 index 193572b..0000000 --- a/fuzz/workdir/corpus/eb462902b0411b260af271b86787cfb8d393bb3e-4 +++ /dev/null @@ -1 +0,0 @@ -Øߺ˶˶ diff --git a/fuzz/workdir/corpus/ec0bfd6b4953ef9c5d9a33d899747a0c591887c3-13 b/fuzz/workdir/corpus/ec0bfd6b4953ef9c5d9a33d899747a0c591887c3-13 deleted file mode 100644 index 8dbb840..0000000 --- a/fuzz/workdir/corpus/ec0bfd6b4953ef9c5d9a33d899747a0c591887c3-13 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/f5c1a01bfe28c33e0b6005de74bbf2908eda33b6-8 b/fuzz/workdir/corpus/f5c1a01bfe28c33e0b6005de74bbf2908eda33b6-8 deleted file mode 100644 index 01b879a..0000000 --- a/fuzz/workdir/corpus/f5c1a01bfe28c33e0b6005de74bbf2908eda33b6-8 +++ /dev/null @@ -1 +0,0 @@ - diff --git a/fuzz/workdir/corpus/f961048abbb7c870f5d8485d60364dc93453e6e9 b/fuzz/workdir/corpus/f961048abbb7c870f5d8485d60364dc93453e6e9 deleted file mode 100644 index 0d904fe..0000000 --- a/fuzz/workdir/corpus/f961048abbb7c870f5d8485d60364dc93453e6e9 +++ /dev/null @@ -1,2 +0,0 @@ -o -__V4Thql_118_9_5597_8q154__x_14nBRtrO_p__czVF25N8__k39KsdTIZM4B_4Z9_V_U_tnGs4C_Ra6v_09GR0_ \ No newline at end of file diff --git a/levenshtein_test.go b/levenshtein_test.go index dd3607a..6c5e351 100644 --- a/levenshtein_test.go +++ b/levenshtein_test.go @@ -142,3 +142,45 @@ func BenchmarkAll(b *testing.B) { } sink = tmp } + +// Fuzzing +// ---------------------------------------------- + +func FuzzComputeDistanceDifferent(f *testing.F) { + testcases := []struct{ a, b string }{ + {"levenshtein", "frankenstein"}, + {"resumé and café", "resumés and cafés"}, + {"Hafþór Júlíus Björnsson", "Hafþor Julius Bjornsson"}, + {"།་གམ་འས་པ་་མ།", "།་གམའས་པ་་མ"}, + } + for _, tc := range testcases { + f.Add(tc.a, tc.b) + } + f.Fuzz(func(t *testing.T, a, b string) { + n := agnivade.ComputeDistance(a, b) + if n < 0 { + t.Errorf("Distance can not be negative: %d, a: %q, b: %q", n, a, b) + } + if n > len(a)+len(b) { + t.Errorf("Distance can not be greater than sum of lengths of a and b: %d, a: %q, b: %q", n, a, b) + } + }) +} + +func FuzzComputeDistanceEqual(f *testing.F) { + testcases := []string{ + "levenshtein", "frankenstein", + "resumé and café", "resumés and cafés", + "Hafþór Júlíus Björnsson", "Hafþor Julius Bjornsson", + "།་གམ་འས་པ་་མ།", "།་གམའས་པ་་མ", + } + for _, tc := range testcases { + f.Add(tc) + } + f.Fuzz(func(t *testing.T, a string) { + n := agnivade.ComputeDistance(a, a) + if n != 0 { + t.Errorf("Distance must be zero: %d, a: %q", n, a) + } + }) +}