PluginProbe ʕ •ᴥ•ʔ
ShareThis Dashboard for Google Analytics / 3.1.7
ShareThis Dashboard for Google Analytics v3.1.7
3.3.2 trunk 1.0.7 2.0.0 2.0.1 2.0.2 2.0.3 2.0.4 2.0.5 2.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2.5 2.3.5 2.3.6 2.3.7 2.3.8 2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.5.3 2.5.4 2.5.5 3.0.0 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.5 3.1.6 3.1.7 3.2.0 3.2.1 3.2.2 3.2.3 3.2.4 3.3.0 3.3.1
googleanalytics / lib / analytics-admin / vendor / google / crc32 / ext / tests / 002_basic.phpt
googleanalytics / lib / analytics-admin / vendor / google / crc32 / ext / tests Last commit date
001_loaded.phpt 3 years ago 002_basic.phpt 3 years ago 003_extend.phpt 3 years ago 004_error.phpt 3 years ago 005_hash.phpt 3 years ago
002_basic.phpt
94 lines
1 --TEST--
2 crc32c() basic tests
3 --SKIPIF--
4 <?php
5 if (!extension_loaded('crc32c')) {
6 echo 'skip';
7 }
8 ?>
9 --FILE--
10 <?php
11 function h($str)
12 {
13 return bin2hex(crc32c($str));
14 }
15
16 echo h(''), "\n";
17 echo h('a'), "\n";
18 echo h('ab'), "\n";
19 echo h('abc'), "\n";
20 echo h('abcd'), "\n";
21 echo h('abcde'), "\n";
22 echo h('abcdef'), "\n";
23 echo h('abcdefg'), "\n";
24 echo h('abcdefgh'), "\n";
25 echo h('abcdefghi'), "\n";
26 echo h('abcdefghij'), "\n";
27 echo h('abcdefghijklmnopqrstuvwxyz'), "\n";
28 echo h('ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'), "\n";
29 echo h('12345678901234567890123456789012345678901234567890123456789012345678901234567890'), "\n";
30 echo h('message digest'), "\n";
31 echo h("I can't remember anything"), "\n";
32 echo h("I can't remember anything" . "Can’t tell if this is true or dream"), "\n";
33 echo h('Discard medicine more than two years old.'), "\n";
34 echo h('He who has a shady past knows that nice guys finish last.'), "\n";
35 echo h("I wouldn't marry him with a ten foot pole."), "\n";
36 echo h("Free! Free!/A trip/to Mars/for 900/empty jars/Burma Shave"), "\n";
37 echo h("The days of the digital watch are numbered. -Tom Stoppard"), "\n";
38 echo h("Nepal premier won't resign."), "\n";
39 echo h("For every action there is an equal and opposite government program."), "\n";
40 echo h("His money is twice tainted: 'taint yours and 'taint mine."), "\n";
41 echo h("There is no reason for any individual to have a computer in their home. -Ken Olsen, 1977"), "\n";
42 echo h("It's a tiny change to the code and not completely disgusting. - Bob Manchek"), "\n";
43 echo h("size: a.out: bad magic"), "\n";
44 echo h("The major problem is with sendmail. -Mark Horton"), "\n";
45 echo h("Give me a rock, paper and scissors and I will move the world. CCFestoon"), "\n";
46 echo h("If the enemy is within range, then so are you."), "\n";
47 echo h("It's well we cannot hear the screams/That we create in others' dreams."), "\n";
48 echo h("You remind me of a TV show, but that's all right: I watch it anyway."), "\n";
49 echo h("C is as portable as Stonehedge!!"), "\n";
50 echo h("Even if I could be Shakespeare, I think I should still choose to be Faraday. - A. Huxley"), "\n";
51 echo h("The fugacity of a constituent in a mixture of gases at a given temperature is proportional to its mole fraction. Lewis-Randall Rule"), "\n";
52 echo h("How can you write a big system without C++? -Paul Glick"), "\n";
53 echo h("\x00\x01\x02\x03\x04\x05\x06\x07\x08\t\n\v\f\r\x0e\x0f\x10\x11\x12\x13\x14\x15\x16\x17\x18\x19\x1a\x1b\x1c\x1d\x1e\x1f !\"#\$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~\x7f\x80\x81\x82\x83\x84\x85\x86\x87\x88\x89\x8a\x8b\x8c\x8d\x8e\x8f\x90\x91\x92\x93\x94\x95\x96\x97\x98\x99\x9a\x9b\x9c\x9d\x9e\x9f\xa0\xa1\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xab\xac\xad\xae\xaf\xb0\xb1\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xbb\xbc\xbd\xbe\xbf\xc0\xc1\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xcb\xcc\xcd\xce\xcf\xd0\xd1\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xdb\xdc\xdd\xde\xdf\xe0\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xeb\xec\xed\xee\xef\xf0\xf1\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xfb\xfc\xfd\xfe\xff"), "\n";
54 ?>
55 --EXPECT--
56 00000000
57 c1d04330
58 e2a22936
59 364b3fb7
60 92c80a31
61 c450d697
62 53bceff1
63 e627f441
64 0a9421b7
65 2ddc99fc
66 e6599437
67 9ee6ef25
68 a245d57d
69 477a6781
70 02bd79d0
71 5e405e93
72 516ad412
73 b2cc01fe
74 0e28207f
75 be93f964
76 9e3be0c3
77 f505ef04
78 85d3dc82
79 c5142380
80 75eb77dd
81 91ebe9f7
82 f0b1168e
83 572b74e2
84 8a58a6d5
85 9c426c50
86 735400a4
87 bec49c95
88 a95a2079
89 de2e65c5
90 297a88ed
91 66ed1d8b
92 dcded527
93 9c44184b
94