PATH:
opt
/
alt
/
tests
/
alt-php54-pecl-bitset_2.0.3-1.el8
/
tests
--TEST-- bitset_from_hash --SKIPIF-- <?php if (!extension_loaded("bitset")) print "skip"; ?> <?php die('skipping for now'); ?> --FILE-- <?php error_reporting(E_ALL ^ E_DEPRECATED); $bit_array = array(); if( bitset_to_string( bitset_from_hash( $bit_array ) ) == "" ) echo "empty input - ok\n"; $bit_array = array( -11 => 1 ); if( bitset_to_string( bitset_from_hash( $bit_array ) ) == "" ) echo "negative input - ok\n"; $bit_array = array(0,1,1,0,1,1,0,1,0,0,1,0, -11=> 1, "-3" => 1, -4 => 0, "-3" => 1, "-3000000" => 1); var_dump(bitset_to_string(bitset_from_hash($bit_array))); $bit_array = array(0,1,1,0,1,1,0,1,0,0,1,0,1,0,1,1,); var_dump(bitset_to_string(bitset_from_hash($bit_array))); $bit_array = array(0,1,1,0,1,1,0,1,0,0,1,0,1,0,1,1,1); var_dump(bitset_to_string(bitset_from_hash($bit_array))); $bit_array = array( 1 => 1, 3 => 1, 8 => 1, 4 => 1, "7" => 1, 12 => 1, "13" => 1, "16" => 1, "11" => 1, 10 => 0 ); var_dump(bitset_to_string(bitset_from_hash($bit_array))); ?> --EXPECT-- empty input - ok negative input - ok string(16) "0110110100100000" string(16) "0110110100101011" string(24) "011011010010101110000000" string(24) "010110011001110010000000"
[-] 009.phpt
[edit]
[-] 014.phpt
[edit]
[-] 016.phpt
[edit]
[-] 005.phpt
[edit]
[-] BitSet_getRawValue.phpt
[edit]
[-] BitSet_clear.phpt
[edit]
[-] 012.phpt
[edit]
[-] 013.phpt
[edit]
[-] 003.phpt
[edit]
[-] BitSet_orOp.phpt
[edit]
[-] 018.phpt
[edit]
[-] BitSet_fromString.phpt
[edit]
[-] BitSet_set.phpt
[edit]
[-] BitSet_construct.phpt
[edit]
[-] 007.phpt
[edit]
[-] BitSet_size.phpt
[edit]
[-] 008.phpt
[edit]
[-] BitSet_previousClearBit.phpt
[edit]
[-] 001.phpt
[edit]
[-] BitSet_cardinality.phpt
[edit]
[-] BitSet_isEmpty.phpt
[edit]
[-] 015.phpt
[edit]
[-] 002.phpt
[edit]
[-] 017.phpt
[edit]
[-] BitSet_fromRawValue.phpt
[edit]
[-] BitSet_previousSetBit.phpt
[edit]
[-] BitSet_length.phpt
[edit]
[-] 006.phpt
[edit]
[-] BitSet_toArray.phpt
[edit]
[-] BitSet_andOp.phpt
[edit]
[-] BitSet_get.phpt
[edit]
[-] 004.phpt
[edit]
[+]
..
[-] BitSet_nextSetBit.phpt
[edit]
[-] BitSet_andNotOp.phpt
[edit]
[-] BitSet_nextClearBit.phpt
[edit]
[-] BitSet_xorOp.phpt
[edit]
[-] 010.phpt
[edit]
[-] BitSet_fromArray.phpt
[edit]
[-] 011.phpt
[edit]