305 lines
No EOL
10 KiB
Python
305 lines
No EOL
10 KiB
Python
from unittest import TestCase
|
|
|
|
from benchmark.rabin_karp import rabin_karp_search
|
|
|
|
|
|
class Test_rabin_karp_search(TestCase):
|
|
def test_rabin_karp_search_1(self):
|
|
assert rabin_karp_search(pat='', txt='Kx\UnZ^') == []
|
|
|
|
def test_rabin_karp_search_2(self):
|
|
assert rabin_karp_search(pat='pub#b8o', txt=';Q[d2{v.>') == []
|
|
|
|
def test_rabin_karp_search_3(self):
|
|
assert rabin_karp_search(pat='', txt='w:A') == []
|
|
|
|
def test_rabin_karp_search_4(self):
|
|
assert rabin_karp_search(pat='`QiVQ', txt='{1*0ELsc') == []
|
|
|
|
def test_rabin_karp_search_5(self):
|
|
assert rabin_karp_search(pat='Th D', txt='a:uH$>') == []
|
|
|
|
def test_rabin_karp_search_6(self):
|
|
assert rabin_karp_search(pat='yO8', txt='b$5p6}<') == []
|
|
|
|
def test_rabin_karp_search_7(self):
|
|
assert rabin_karp_search(pat=',qr"', txt='aI!zhr"nc') == []
|
|
|
|
def test_rabin_karp_search_8(self):
|
|
assert rabin_karp_search(pat='s', txt='BYDqJ3pr') == []
|
|
|
|
def test_rabin_karp_search_9(self):
|
|
assert rabin_karp_search(pat='5!5!', txt='g*{qF') == []
|
|
|
|
def test_rabin_karp_search_10(self):
|
|
assert rabin_karp_search(pat=':hiVQ', txt='V'o%%/E-') == []
|
|
|
|
def test_rabin_karp_search_11(self):
|
|
assert rabin_karp_search(pat='MVi<Z:', txt='thMHE|f') == []
|
|
|
|
def test_rabin_karp_search_12(self):
|
|
assert rabin_karp_search(pat='k', txt='[R}M') == []
|
|
|
|
def test_rabin_karp_search_13(self):
|
|
assert rabin_karp_search(pat='sVg', txt='x\Col<Jx') == []
|
|
|
|
def test_rabin_karp_search_14(self):
|
|
assert rabin_karp_search(pat='ZQ{zy', txt='1&x7b"*q') == []
|
|
|
|
def test_rabin_karp_search_15(self):
|
|
assert rabin_karp_search(pat='Ce$&\i', txt='o/p$@]') == []
|
|
|
|
def test_rabin_karp_search_16(self):
|
|
assert rabin_karp_search(pat='4x', txt='jp8qx') == []
|
|
|
|
def test_rabin_karp_search_17(self):
|
|
assert rabin_karp_search(pat='z4bTc', txt='^'UtAD') == []
|
|
|
|
def test_rabin_karp_search_18(self):
|
|
assert rabin_karp_search(pat='$YUHq~', txt='is-AMaq') == []
|
|
|
|
def test_rabin_karp_search_19(self):
|
|
assert rabin_karp_search(pat='', txt='S!!&SE~,5') == []
|
|
|
|
def test_rabin_karp_search_20(self):
|
|
assert rabin_karp_search(pat='{', txt='_(z4e') == []
|
|
|
|
def test_rabin_karp_search_21(self):
|
|
assert rabin_karp_search(pat='', txt='3a') == []
|
|
|
|
def test_rabin_karp_search_22(self):
|
|
assert rabin_karp_search(pat='g-', txt='>RK~@m') == []
|
|
|
|
def test_rabin_karp_search_23(self):
|
|
assert rabin_karp_search(pat='O{', txt='G)a') == []
|
|
|
|
def test_rabin_karp_search_24(self):
|
|
assert rabin_karp_search(pat='mZ(=', txt='-E3l') == []
|
|
|
|
def test_rabin_karp_search_25(self):
|
|
assert rabin_karp_search(pat='qv$N)U', txt='XpxIJer }') == []
|
|
|
|
def test_rabin_karp_search_26(self):
|
|
assert rabin_karp_search(pat='q%pCIP{f', txt='c'TX\U<F!') == []
|
|
|
|
def test_rabin_karp_search_27(self):
|
|
assert rabin_karp_search(pat='q', txt='pT.\3(x') == []
|
|
|
|
def test_rabin_karp_search_28(self):
|
|
assert rabin_karp_search(pat='D#kH0', txt='H/\F;b)|]') == []
|
|
|
|
def test_rabin_karp_search_29(self):
|
|
assert rabin_karp_search(pat='`Q<', txt='{1*0ELsc') == []
|
|
|
|
def test_rabin_karp_search_30(self):
|
|
assert rabin_karp_search(pat='', txt=';En`-%ma3') == []
|
|
|
|
def test_rabin_karp_search_31(self):
|
|
assert rabin_karp_search(pat='', txt='bu') == []
|
|
|
|
def test_rabin_karp_search_32(self):
|
|
assert rabin_karp_search(pat='RA`0!', txt='>g5Q3}') == []
|
|
|
|
def test_rabin_karp_search_33(self):
|
|
assert rabin_karp_search(pat='q.#qV^44', txt='G=*Kq4L)Z') == []
|
|
|
|
def test_rabin_karp_search_34(self):
|
|
assert rabin_karp_search(pat='', txt='<Xv7lIk') == []
|
|
|
|
def test_rabin_karp_search_35(self):
|
|
assert rabin_karp_search(pat='2c1@m', txt='^pINDb') == []
|
|
|
|
def test_rabin_karp_search_36(self):
|
|
assert rabin_karp_search(pat='v>O\', txt='ppDt2F[<i') == []
|
|
|
|
def test_rabin_karp_search_37(self):
|
|
assert rabin_karp_search(pat='[', txt='sIZap]A') == []
|
|
|
|
def test_rabin_karp_search_38(self):
|
|
assert rabin_karp_search(pat='WC&T`$', txt='B>GAoo') == []
|
|
|
|
def test_rabin_karp_search_39(self):
|
|
assert rabin_karp_search(pat='q9<', txt='`gx') == []
|
|
|
|
def test_rabin_karp_search_40(self):
|
|
assert rabin_karp_search(pat='j[_\Q', txt='YdgPvfOeZ') == []
|
|
|
|
def test_rabin_karp_search_41(self):
|
|
assert rabin_karp_search(pat='"j$', txt='iz97wupnd') == []
|
|
|
|
def test_rabin_karp_search_42(self):
|
|
assert rabin_karp_search(pat='OBZ1YZ)h', txt='^=V&|A76\') == []
|
|
|
|
def test_rabin_karp_search_43(self):
|
|
assert rabin_karp_search(pat='D#{', txt='5NFI9') == []
|
|
|
|
def test_rabin_karp_search_44(self):
|
|
assert rabin_karp_search(pat='[R', txt='(@?'X&=') == []
|
|
|
|
def test_rabin_karp_search_45(self):
|
|
assert rabin_karp_search(pat='Fl?P8', txt='%X-hKVA') == []
|
|
|
|
def test_rabin_karp_search_46(self):
|
|
assert rabin_karp_search(pat='Bo', txt='V}M7bNuv') == []
|
|
|
|
def test_rabin_karp_search_47(self):
|
|
assert rabin_karp_search(pat='xA9', txt='k~#G_J') == []
|
|
|
|
def test_rabin_karp_search_48(self):
|
|
assert rabin_karp_search(pat='4', txt='<DVY') == []
|
|
|
|
def test_rabin_karp_search_49(self):
|
|
assert rabin_karp_search(pat='*w', txt='LO#SW') == []
|
|
|
|
def test_rabin_karp_search_50(self):
|
|
assert rabin_karp_search(pat='', txt='b:l *#D') == []
|
|
|
|
def test_rabin_karp_search_51(self):
|
|
assert rabin_karp_search(pat='', txt=':u') == []
|
|
|
|
def test_rabin_karp_search_52(self):
|
|
assert rabin_karp_search(pat='#xGMAp=O', txt='S$##h,dQG') == []
|
|
|
|
def test_rabin_karp_search_53(self):
|
|
assert rabin_karp_search(pat=';', txt='HNN19Z') == []
|
|
|
|
def test_rabin_karp_search_54(self):
|
|
assert rabin_karp_search(pat='E@w)', txt='n?Yw0') == []
|
|
|
|
def test_rabin_karp_search_55(self):
|
|
assert rabin_karp_search(pat='"}A', txt='j:@"V') == []
|
|
|
|
def test_rabin_karp_search_56(self):
|
|
assert rabin_karp_search(pat='G', txt='~') == []
|
|
|
|
def test_rabin_karp_search_57(self):
|
|
assert rabin_karp_search(pat='M', txt='v7qt') == []
|
|
|
|
def test_rabin_karp_search_58(self):
|
|
assert rabin_karp_search(pat='', txt='2us0f') == []
|
|
|
|
def test_rabin_karp_search_59(self):
|
|
assert rabin_karp_search(pat='05GI', txt='3T_d2)V') == []
|
|
|
|
def test_rabin_karp_search_60(self):
|
|
assert rabin_karp_search(pat='aO', txt='^uSVs/_') == []
|
|
|
|
def test_rabin_karp_search_61(self):
|
|
assert rabin_karp_search(pat='', txt='Rh') == []
|
|
|
|
def test_rabin_karp_search_62(self):
|
|
assert rabin_karp_search(pat='6', txt='#DL') == []
|
|
|
|
def test_rabin_karp_search_63(self):
|
|
assert rabin_karp_search(pat='JS', txt=':5/l') == []
|
|
|
|
def test_rabin_karp_search_64(self):
|
|
assert rabin_karp_search(pat='', txt='BgP"p') == []
|
|
|
|
def test_rabin_karp_search_65(self):
|
|
assert rabin_karp_search(pat='u!Yi', txt='%<?I') == []
|
|
|
|
def test_rabin_karp_search_66(self):
|
|
assert rabin_karp_search(pat='!>w', txt='F#29$ixn') == []
|
|
|
|
def test_rabin_karp_search_67(self):
|
|
assert rabin_karp_search(pat='*', txt='<L*k') == [2]
|
|
|
|
def test_rabin_karp_search_68(self):
|
|
assert rabin_karp_search(pat='Q2[o^8', txt='hB=IYX'') == []
|
|
|
|
def test_rabin_karp_search_69(self):
|
|
assert rabin_karp_search(pat='6\', txt='NnHWjE7m') == []
|
|
|
|
def test_rabin_karp_search_70(self):
|
|
assert rabin_karp_search(pat='Q{]', txt='C$PV') == []
|
|
|
|
def test_rabin_karp_search_71(self):
|
|
assert rabin_karp_search(pat='19', txt='&|A(wedic') == []
|
|
|
|
def test_rabin_karp_search_72(self):
|
|
assert rabin_karp_search(pat='iPT8Swj', txt='?.?>RZw') == []
|
|
|
|
def test_rabin_karp_search_73(self):
|
|
assert rabin_karp_search(pat='&\', txt='muCGJW') == []
|
|
|
|
def test_rabin_karp_search_74(self):
|
|
assert rabin_karp_search(pat='.fg=wg9Q', txt='`jH;TZPk') == []
|
|
|
|
def test_rabin_karp_search_75(self):
|
|
assert rabin_karp_search(pat='K', txt=')$3x') == []
|
|
|
|
def test_rabin_karp_search_76(self):
|
|
assert rabin_karp_search(pat='q=W$V', txt='4$J75rSH^') == []
|
|
|
|
def test_rabin_karp_search_77(self):
|
|
assert rabin_karp_search(pat='%Ajm6', txt='|7w)3') == []
|
|
|
|
def test_rabin_karp_search_78(self):
|
|
assert rabin_karp_search(pat='TQ', txt='KNJ') == []
|
|
|
|
def test_rabin_karp_search_79(self):
|
|
assert rabin_karp_search(pat='C @BTIj', txt='1WjyJ://9') == []
|
|
|
|
def test_rabin_karp_search_80(self):
|
|
assert rabin_karp_search(pat='u', txt=',"[q!G>') == []
|
|
|
|
def test_rabin_karp_search_81(self):
|
|
assert rabin_karp_search(pat='KvNG{l,eA', txt='v1]8PbMfI') == []
|
|
|
|
def test_rabin_karp_search_82(self):
|
|
assert rabin_karp_search(pat='[doZ`/"', txt='la`[QV+') == []
|
|
|
|
def test_rabin_karp_search_83(self):
|
|
assert rabin_karp_search(pat='"', txt=',{Ie?_`a=') == []
|
|
|
|
def test_rabin_karp_search_84(self):
|
|
assert rabin_karp_search(pat='l', txt='&sf*jS(') == []
|
|
|
|
def test_rabin_karp_search_85(self):
|
|
assert rabin_karp_search(pat='j6!', txt='vr3w') == []
|
|
|
|
def test_rabin_karp_search_86(self):
|
|
assert rabin_karp_search(pat='1kfuy:', txt='iy%Z<Pc=') == []
|
|
|
|
def test_rabin_karp_search_87(self):
|
|
assert rabin_karp_search(pat='#', txt='V((p=)(G') == []
|
|
|
|
def test_rabin_karp_search_88(self):
|
|
assert rabin_karp_search(pat='Vb+\', txt='&Tg}i#j<t') == []
|
|
|
|
def test_rabin_karp_search_89(self):
|
|
assert rabin_karp_search(pat='wjaXze3', txt='C#-s/*w') == []
|
|
|
|
def test_rabin_karp_search_90(self):
|
|
assert rabin_karp_search(pat='!e$&\i', txt='F#29$ixn') == []
|
|
|
|
def test_rabin_karp_search_91(self):
|
|
assert rabin_karp_search(pat='g[NA', txt='H7`?D') == []
|
|
|
|
def test_rabin_karp_search_92(self):
|
|
assert rabin_karp_search(pat='Th Dl', txt='a:uH$>') == []
|
|
|
|
def test_rabin_karp_search_93(self):
|
|
assert rabin_karp_search(pat='&05#i', txt='B(\b=') == []
|
|
|
|
def test_rabin_karp_search_94(self):
|
|
assert rabin_karp_search(pat='~', txt='1$ i0$3') == []
|
|
|
|
def test_rabin_karp_search_95(self):
|
|
assert rabin_karp_search(pat='!7T', txt='$9m$n') == []
|
|
|
|
def test_rabin_karp_search_96(self):
|
|
assert rabin_karp_search(pat='Ge<', txt='`gx') == []
|
|
|
|
def test_rabin_karp_search_97(self):
|
|
assert rabin_karp_search(pat=':*wJ'K<i', txt='xZEXgKyZt') == []
|
|
|
|
def test_rabin_karp_search_98(self):
|
|
assert rabin_karp_search(pat='jE/', txt='Ko'L0V_=') == []
|
|
|
|
def test_rabin_karp_search_99(self):
|
|
assert rabin_karp_search(pat='', txt=':^Y/') == []
|
|
|
|
def test_rabin_karp_search_100(self):
|
|
assert rabin_karp_search(pat='_', txt='d]') == [] |