| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793 |
- /*
- Legal:
- Version: MPL 1.1
-
- The contents of this file are subject to the Mozilla Public License Version
- 1.1 the "License"; you may not use this file except in compliance with
- the License. You may obtain a copy of the License at
- http://www.mozilla.org/MPL/
-
- Software distributed under the License is distributed on an "AS IS" basis,
- WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
- for the specific language governing rights and limitations under the
- License.
-
- The Original Code is the YSI framework.
-
- The Initial Developer of the Original Code is Alex "Y_Less" Cole.
- Portions created by the Initial Developer are Copyright C 2011
- the Initial Developer. All Rights Reserved.
- Contributors:
- Y_Less
- koolk
- JoeBullet/Google63
- g_aSlice/Slice
- Misiur
- samphunter
- tianmeta
- maddinat0r
- spacemud
- Crayder
- Dayvison
- Ahmad45123
- Zeex
- irinel1996
- Yiin-
- Chaprnks
- Konstantinos
- Masterchen09
- Southclaws
- PatchwerkQWER
- m0k1
- paulommu
- udan111
- Thanks:
- JoeBullet/Google63 - Handy arbitrary ASM jump code using SCTRL.
- ZeeX - Very productive conversations.
- koolk - IsPlayerinAreaEx code.
- TheAlpha - Danish translation.
- breadfish - German translation.
- Fireburn - Dutch translation.
- yom - French translation.
- 50p - Polish translation.
- Zamaroht - Spanish translation.
- Los - Portuguese translation.
- Dracoblue, sintax, mabako, Xtreme, other coders - Producing other modes for
- me to strive to better.
- Pixels^ - Running XScripters where the idea was born.
- Matite - Pestering me to release it and using it.
- Very special thanks to:
- Thiadmer - PAWN, whose limits continue to amaze me!
- Kye/Kalcor - SA:MP.
- SA:MP Team past, present and future - SA:MP.
- Optional plugins:
- Gamer_Z - GPS.
- Incognito - Streamer.
- Me - sscanf2, fixes2, Whirlpool.
- */
- Test:y_stringhash__Empty()
- {
- new
- h0 = _H@b<>,
- h1 = _H@f<>,
- h2 = _H@a<>;
- ASSERT(h0 == -1);
- ASSERT(h1 == 2166136261);
- ASSERT(h2 == 2166136261);
- h1 = _H@b(),
- h2 = _H@f(),
- h0 = _H@a();
- ASSERT(h1 == -1);
- ASSERT(h2 == 2166136261);
- ASSERT(h0 == 2166136261);
- h2 = YHash("", .type = hash_bernstein),
- h0 = YHash("", .type = hash_fnv1),
- h1 = YHash("", .type = hash_fnv1a);
- ASSERT(h2 == -1);
- ASSERT(h0 == 2166136261);
- ASSERT(h1 == 2166136261);
- h2 = _H<>,
- h0 = _H();
- ASSERT(h2 == -1);
- ASSERT(h0 == -1);
- }
- Test:y_stringhash__Chars0()
- {
- new
- hh;
- hh = _H<aabbccddeeff>;
- ASSERT(hh == YHash("aabbccddeeff", .type = hash_bernstein));
- hh = _H<gghhiijjkkll>;
- ASSERT(hh == YHash("gghhiijjkkll", .type = hash_bernstein));
- hh = _H<mmnnooppqqrr>;
- ASSERT(hh == YHash("mmnnooppqqrr", .type = hash_bernstein));
- hh = _H<ssttuuvvwwxx>;
- ASSERT(hh == YHash("ssttuuvvwwxx", .type = hash_bernstein));
- hh = _H<yyzz00112233>;
- ASSERT(hh == YHash("yyzz00112233", .type = hash_bernstein));
- hh = _H<445566778899>;
- ASSERT(hh == YHash("445566778899", .type = hash_bernstein));
- hh = _H<AABBCCDDEEFF>;
- ASSERT(hh == YHash("AABBCCDDEEFF", .type = hash_bernstein));
- hh = _H<GGHHIIJJKKLL>;
- ASSERT(hh == YHash("GGHHIIJJKKLL", .type = hash_bernstein));
- hh = _H<MMNNOOPPQQRR>;
- ASSERT(hh == YHash("MMNNOOPPQQRR", .type = hash_bernstein));
- hh = _H<SSTTUUVVWWXX>;
- ASSERT(hh == YHash("SSTTUUVVWWXX", .type = hash_bernstein));
- hh = _H<YYZZ @@__yh>;
- ASSERT(hh == YHash("YYZZ @@__yh", .type = hash_bernstein));
- hh = _I<aabbccddeeff>;
- ASSERT(hh == YHash("aabbccddeeff", .sensitive = false, .type = hash_bernstein));
- hh = _I<gghhiijjkkll>;
- ASSERT(hh == YHash("gghhiijjkkll", .sensitive = false, .type = hash_bernstein));
- hh = _I<mmnnooppqqrr>;
- ASSERT(hh == YHash("mmnnooppqqrr", .sensitive = false, .type = hash_bernstein));
- hh = _I<ssttuuvvwwxx>;
- ASSERT(hh == YHash("ssttuuvvwwxx", .sensitive = false, .type = hash_bernstein));
- hh = _I<yyzz00112233>;
- ASSERT(hh == YHash("yyzz00112233", .sensitive = false, .type = hash_bernstein));
- hh = _I<445566778899>;
- ASSERT(hh == YHash("445566778899", .sensitive = false, .type = hash_bernstein));
- hh = _I<AABBCCDDEEFF>;
- ASSERT(hh == YHash("AABBCCDDEEFF", .sensitive = false, .type = hash_bernstein));
- hh = _I<GGHHIIJJKKLL>;
- ASSERT(hh == YHash("GGHHIIJJKKLL", .sensitive = false, .type = hash_bernstein));
- hh = _I<MMNNOOPPQQRR>;
- ASSERT(hh == YHash("MMNNOOPPQQRR", .sensitive = false, .type = hash_bernstein));
- hh = _I<SSTTUUVVWWXX>;
- ASSERT(hh == YHash("SSTTUUVVWWXX", .sensitive = false, .type = hash_bernstein));
- hh = _I<YYZZ @@__yh>;
- ASSERT(hh == YHash("YYZZ @@__yh", .sensitive = false, .type = hash_bernstein));
- }
- Test:y_stringhash__Chars1()
- {
- new
- hh;
- hh = _H@f<aabbccddeeff>;
- ASSERT(hh == YHash("aabbccddeeff", .type = hash_fnv1));
- hh = _H@f<gghhiijjkkll>;
- ASSERT(hh == YHash("gghhiijjkkll", .type = hash_fnv1));
- hh = _H@f<mmnnooppqqrr>;
- ASSERT(hh == YHash("mmnnooppqqrr", .type = hash_fnv1));
- hh = _H@f<ssttuuvvwwxx>;
- ASSERT(hh == YHash("ssttuuvvwwxx", .type = hash_fnv1));
- hh = _H@f<yyzz00112233>;
- ASSERT(hh == YHash("yyzz00112233", .type = hash_fnv1));
- hh = _H@f<445566778899>;
- ASSERT(hh == YHash("445566778899", .type = hash_fnv1));
- hh = _H@f<AABBCCDDEEFF>;
- ASSERT(hh == YHash("AABBCCDDEEFF", .type = hash_fnv1));
- hh = _H@f<GGHHIIJJKKLL>;
- ASSERT(hh == YHash("GGHHIIJJKKLL", .type = hash_fnv1));
- hh = _H@f<MMNNOOPPQQRR>;
- ASSERT(hh == YHash("MMNNOOPPQQRR", .type = hash_fnv1));
- hh = _H@f<SSTTUUVVWWXX>;
- ASSERT(hh == YHash("SSTTUUVVWWXX", .type = hash_fnv1));
- hh = _H@f<YYZZ @@__yh>;
- ASSERT(hh == YHash("YYZZ @@__yh", .type = hash_fnv1));
- hh = _I@f<aabbccddeeff>;
- ASSERT(hh == YHash("aabbccddeeff", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<gghhiijjkkll>;
- ASSERT(hh == YHash("gghhiijjkkll", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<mmnnooppqqrr>;
- ASSERT(hh == YHash("mmnnooppqqrr", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<ssttuuvvwwxx>;
- ASSERT(hh == YHash("ssttuuvvwwxx", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<yyzz00112233>;
- ASSERT(hh == YHash("yyzz00112233", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<445566778899>;
- ASSERT(hh == YHash("445566778899", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<AABBCCDDEEFF>;
- ASSERT(hh == YHash("AABBCCDDEEFF", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<GGHHIIJJKKLL>;
- ASSERT(hh == YHash("GGHHIIJJKKLL", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<MMNNOOPPQQRR>;
- ASSERT(hh == YHash("MMNNOOPPQQRR", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<SSTTUUVVWWXX>;
- ASSERT(hh == YHash("SSTTUUVVWWXX", .sensitive = false, .type = hash_fnv1));
- hh = _I@f<YYZZ @@__yh>;
- ASSERT(hh == YHash("YYZZ @@__yh", .sensitive = false, .type = hash_fnv1));
- }
- Test:y_stringhash__Chars2()
- {
- new
- hh;
- hh = _H@a<aabbccddeeff>;
- ASSERT(hh == YHash("aabbccddeeff", .type = hash_fnv1a));
- hh = _H@a<gghhiijjkkll>;
- ASSERT(hh == YHash("gghhiijjkkll", .type = hash_fnv1a));
- hh = _H@a<mmnnooppqqrr>;
- ASSERT(hh == YHash("mmnnooppqqrr", .type = hash_fnv1a));
- hh = _H@a<ssttuuvvwwxx>;
- ASSERT(hh == YHash("ssttuuvvwwxx", .type = hash_fnv1a));
- hh = _H@a<yyzz00112233>;
- ASSERT(hh == YHash("yyzz00112233", .type = hash_fnv1a));
- hh = _H@a<445566778899>;
- ASSERT(hh == YHash("445566778899", .type = hash_fnv1a));
- hh = _H@a<AABBCCDDEEFF>;
- ASSERT(hh == YHash("AABBCCDDEEFF", .type = hash_fnv1a));
- hh = _H@a<GGHHIIJJKKLL>;
- ASSERT(hh == YHash("GGHHIIJJKKLL", .type = hash_fnv1a));
- hh = _H@a<MMNNOOPPQQRR>;
- ASSERT(hh == YHash("MMNNOOPPQQRR", .type = hash_fnv1a));
- hh = _H@a<SSTTUUVVWWXX>;
- ASSERT(hh == YHash("SSTTUUVVWWXX", .type = hash_fnv1a));
- hh = _H@a<YYZZ @@__yh>;
- ASSERT(hh == YHash("YYZZ @@__yh", .type = hash_fnv1a));
- hh = _I@a<aabbccddeeff>;
- ASSERT(hh == YHash("aabbccddeeff", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<gghhiijjkkll>;
- ASSERT(hh == YHash("gghhiijjkkll", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<mmnnooppqqrr>;
- ASSERT(hh == YHash("mmnnooppqqrr", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<ssttuuvvwwxx>;
- ASSERT(hh == YHash("ssttuuvvwwxx", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<yyzz00112233>;
- ASSERT(hh == YHash("yyzz00112233", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<445566778899>;
- ASSERT(hh == YHash("445566778899", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<AABBCCDDEEFF>;
- ASSERT(hh == YHash("AABBCCDDEEFF", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<GGHHIIJJKKLL>;
- ASSERT(hh == YHash("GGHHIIJJKKLL", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<MMNNOOPPQQRR>;
- ASSERT(hh == YHash("MMNNOOPPQQRR", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<SSTTUUVVWWXX>;
- ASSERT(hh == YHash("SSTTUUVVWWXX", .sensitive = false, .type = hash_fnv1a));
- hh = _I@a<YYZZ @@__yh>;
- ASSERT(hh == YHash("YYZZ @@__yh", .sensitive = false, .type = hash_fnv1a));
- }
- Test:y_stringhash__case()
- {
- new
- h0,
- h1;
- h0 = _H<HEllO>;
- h1 = _H<HELLO>;
- ASSERT(h0 != h1);
- h0 = _I<HEllO>;
- h1 = _I<HELLO>;
- ASSERT(h0 == h1);
- h0 = _H@b<heLLo>;
- h1 = _H@b<HELLO>;
- ASSERT(h0 != h1);
- h0 = _I@b<heLLo>;
- h1 = _I@b<HELLO>;
- ASSERT(h0 == h1);
- h0 = _H@f<hello>;
- h1 = _H@f<HELLO>;
- ASSERT(h0 != h1);
- h0 = _I@f<hello>;
- h1 = _I@f<HELLO>;
- ASSERT(h0 == h1);
- h0 = _H@a<hElLo>;
- h1 = _H@a<HELLO>;
- ASSERT(h0 != h1);
- h0 = _I@a<hElLo>;
- h1 = _I@a<HELLO>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H1()
- {
- new
- h0 = _H<hello>,
- h1 = _H<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I1()
- {
- new
- h0 = _I<hello>,
- h1 = _I<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H2()
- {
- new
- h0 = _H(h,e,l,l,o),
- h1 = _H(t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I2()
- {
- new
- h0 = _I(h,e,l,l,o),
- h1 = _I(H,E,L,L,O);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H3()
- {
- new
- h0 = _H@b<hello>,
- h1 = _H@b<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I3()
- {
- new
- h0 = _I@b<hello>,
- h1 = _I@b<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H4()
- {
- new
- h0 = _H@b(h,e,l,l,o),
- h1 = _H@b(t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I4()
- {
- new
- h0 = _I@b(h,e,l,l,o),
- h1 = _I@b(H,E,L,L,O);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H5()
- {
- new
- h0 = _H@f<hello>,
- h1 = _H@f<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I5()
- {
- new
- h0 = _I@f<hello>,
- h1 = _I@f<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H6()
- {
- new
- h0 = _H@f(h,e,l,l,o),
- h1 = _H@f(t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I6()
- {
- new
- h0 = _I@f(h,e,l,l,o),
- h1 = _I@f(H,E,L,L,O);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H7()
- {
- new
- h0 = _H@a<hello>,
- h1 = _H@a<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I7()
- {
- new
- h0 = _I@a<hello>,
- h1 = _I@a<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H8()
- {
- new
- h0 = _H@a(h,e,l,l,o),
- h1 = _H@a(t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I8()
- {
- new
- h0 = _I@a(h,e,l,l,o),
- h1 = _I@a(H,E,L,L,O);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H3e()
- {
- new
- h0 = _H@b<hello>,
- h1 = YHash("hello", .type = hash_bernstein);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I3e()
- {
- new
- h0 = _I@b<hello>,
- h1 = YHash("hello", .type = hash_bernstein, .sensitive = false);
- //printf("%04x%04x %04x%04x", h0 >>> 16, h0 & 0xFFFF, h1 >>> 16, h1 & 0xFFFF);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H4e()
- {
- new
- h0 = _H@b(h,e,l,l,o),
- h1 = YHash("hello", .type = hash_bernstein);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I4e()
- {
- new
- h0 = _I@b(h,e,l,l,o),
- h1 = YHash("hello", .type = hash_bernstein, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H5e()
- {
- new
- h0 = _H@f<hello>,
- h1 = YHash("hello", .type = hash_fnv1);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I5e()
- {
- new
- h0 = _I@f<hello>,
- h1 = YHash("hello", .type = hash_fnv1, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H6e()
- {
- new
- h0 = _H@f(h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I6e()
- {
- new
- h0 = _I@f(h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H7e()
- {
- new
- h0 = _H@a<hello>,
- h1 = YHash("hello", .type = hash_fnv1a);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I7e()
- {
- new
- h0 = _I@a<hello>,
- h1 = YHash("hello", .type = hash_fnv1a, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H8e()
- {
- new
- h0 = _H@a(h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1a);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I8e()
- {
- new
- h0 = _I@a(h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1a, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H3d()
- {
- new
- h0 = HASH:bernstein<hello>,
- h1 = YHash("hello", .type = hash_bernstein);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I3d()
- {
- new
- h0 = HASHi:bernstein<hello>,
- h1 = YHash("hello", .type = hash_bernstein, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H4d()
- {
- new
- h0 = HASH(bernstein,h,e,l,l,o),
- h1 = YHash("hello", .type = hash_bernstein);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I4d()
- {
- new
- h0 = HASHi(bernstein,h,e,l,l,o),
- h1 = YHash("hello", .type = hash_bernstein, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H5d()
- {
- new
- h0 = HASH:fnv1<hello>,
- h1 = YHash("hello", .type = hash_fnv1);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I5d()
- {
- new
- h0 = HASHi:fnv1<hello>,
- h1 = YHash("hello", .type = hash_fnv1, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H6d()
- {
- new
- h0 = HASH(fnv1,h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I6d()
- {
- new
- h0 = HASHi(fnv1,h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H7d()
- {
- new
- h0 = HASH:fnv1a<hello>,
- h1 = YHash("hello", .type = hash_fnv1a);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I7d()
- {
- new
- h0 = HASHi:fnv1a<hello>,
- h1 = YHash("hello", .type = hash_fnv1a, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H8d()
- {
- new
- h0 = HASH(fnv1a,h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1a);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I8d()
- {
- new
- h0 = HASHi(fnv1a,h,e,l,l,o),
- h1 = YHash("hello", .type = hash_fnv1a, .sensitive = false);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H3c()
- {
- new
- h0 = HASH:bernstein<hello>,
- h1 = _H(h,e,l,l,o);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I3c()
- {
- new
- h0 = HASHi:bernstein<hello>,
- h1 = _I(h,e,L,L,o);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H4c()
- {
- new
- h0 = HASH(bernstein,h,e,l,l,o),
- h1 = _H<hello>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I4c()
- {
- new
- h0 = HASHi(bernstein,h,e,l,l,o),
- h1 = _I<hellO>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H5c()
- {
- new
- h0 = HASH:fnv1<hello>,
- h1 = _H@f(h,e,l,l,o);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I5c()
- {
- new
- h0 = HASHi:fnv1<hello>,
- h1 = _I@f(h,E,l,l,o);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H6c()
- {
- new
- h0 = HASH(fnv1,h,e,l,l,o),
- h1 = _H@f<hello>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I6c()
- {
- new
- h0 = HASHi(fnv1,h,e,l,l,o),
- h1 = _I@f<hElLO>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H7c()
- {
- new
- h0 = HASH:fnv1a<hello>,
- h1 = _H@a(h,e,l,l,o);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I7c()
- {
- new
- h0 = HASHi:fnv1a<hello>,
- h1 = _I@a(H,e,l,l,o);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H8c()
- {
- new
- h0 = HASH(fnv1a,h,e,l,l,o),
- h1 = _H@a<hello>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__I8c()
- {
- new
- h0 = HASHi(fnv1a,h,e,l,l,o),
- h1 = _I@a<HELLO>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H3b()
- {
- new
- h0 = HASH:bernstein<hello>,
- h1 = HASH:bernstein<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I3b()
- {
- new
- h0 = HASHi:bernstein<hello>,
- h1 = HASHi:bernstein<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H4b()
- {
- new
- h0 = HASH(bernstein,h,e,l,l,o),
- h1 = HASH(bernstein,t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I4b()
- {
- new
- h0 = HASHi(bernstein,h,e,l,l,o),
- h1 = HASHi(bernstein,H,E,L,L,O);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H5b()
- {
- new
- h0 = HASH:fnv1<hello>,
- h1 = HASH:fnv1<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I5b()
- {
- new
- h0 = HASHi:fnv1<hello>,
- h1 = HASHi:fnv1<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H6b()
- {
- new
- h0 = HASH(fnv1,h,e,l,l,o),
- h1 = HASH(fnv1,t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I6b()
- {
- new
- h0 = HASHi(fnv1,h,e,l,l,o),
- h1 = HASHi(fnv1,H,E,L,L,O);
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H7b()
- {
- new
- h0 = HASH:fnv1a<hello>,
- h1 = HASH:fnv1a<there>;
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I7b()
- {
- new
- h0 = HASHi:fnv1a<hello>,
- h1 = HASHi:fnv1a<HelLo>;
- ASSERT(h0 == h1);
- }
- Test:y_stringhash__H8b()
- {
- new
- h0 = HASH(fnv1a,h,e,l,l,o),
- h1 = HASH(fnv1a,t,h,e,r,e);
- ASSERT(h0 != h1);
- }
- Test:y_stringhash__I8b()
- {
- new
- h0 = HASHi(fnv1a,h,e,l,l,o),
- h1 = HASHi(fnv1a,H,E,L,L,O);
- ASSERT(h0 == h1);
- }
|