芝麻web文件管理V1.00
编辑当前文件:/home/conskgoa/doughi.co.uk/alt-php81-pecl-bitset_3.2.0-1.el8.zip
PK T\%hd d " tests/BitSet_previousClearBit.phptnu [ --TEST-- BitSet BitSet::previousClearBit() - Verifies the previous clear bit is valid based on the provided index --SKIPIF-- --FILE-- set(20); $b->set(18); try { var_dump($b->previousClearBit(0)); } catch (Exception $e) { var_dump(get_class($e).': '.$e->getMessage()); } var_dump($b->previousClearBit(20)); var_dump($b->previousClearBit(18)); var_dump($b->previousClearBit(5)); try { var_dump($b->previousClearBit(65)); } catch (Exception $e) { var_dump(get_class($e).': '.$e->getMessage()); } ?> --EXPECT-- string(75) "InvalidArgumentException: There are no bits smaller than the index provided" int(19) int(17) int(4) string(93) "OutOfRangeException: The specified index parameter exceeds the total number of bits available" PK T\h"$ tests/BitSet_size.phptnu [ --TEST-- BitSet BitSet::size() - Tests to verify the total bits are maintained and correctly represented --SKIPIF-- --FILE-- size()); $b = new BitSet(8); $b->set(2, 4); $b->clear(3); var_dump($b->size()); $b = new BitSet(2048); var_dump($b->size()); ?> --EXPECT-- int(64) int(8) int(2048) PK T\_| tests/BitSet_clear.phptnu [ --TEST-- BitSet BitSet::clear() - Test clearing bits individually, as sets and as a whole --SKIPIF-- --FILE-- set(50); $b->set(63); var_dump($b->get(50)); $b->clear(50); var_dump($b->get(50)); $b->clear(); var_dump($b->__toString()); $b->set(5); $b->set(10); $b->set(20); $b->clear(5, 11); var_dump($b->__toString()); $b->set(0, 1); $b->clear(0); var_dump($b->__toString()); try { var_dump($b->clear(64)); } catch (Exception $e) { echo get_class($e).': '.$e->getMessage()."\n"; } ?> --EXPECT-- bool(true) bool(false) string(64) "0000000000000000000000000000000000000000000000000000000000000000" string(64) "0000000000000000000010000000000000000000000000000000000000000000" string(64) "0100000000000000000010000000000000000000000000000000000000000000" OutOfRangeException: The requested start index is greater than the total number of bitsPK T\ܨ tests/BitSet_andOp.phptnu [ --TEST-- BitSet BitSet::andOp() - Test that logical AND operations actually work --SKIPIF-- --FILE-- set(2); $b->set(6); $c = new BitSet(); $c->set(2); $c->set(50); $b->andOp($c); var_dump($b->__toString()); ?> --EXPECT-- string(64) "0010000000000000000000000000000000000000000000000000000000000000" PK T\Z֥ tests/BitSet_orOp.phptnu [ --TEST-- BitSet BitSet::orOp() - Test that logical OR operations actually work --SKIPIF-- --FILE-- set(2); $b->set(6); $c->set(2); $c->set(9); $b->orOp($c); var_dump($b->__toString()); ?> --EXPECT-- string(64) "0010001001000000000000000000000000000000000000000000000000000000" PK T\Q#Ow w tests/BitSet_nextSetBit.phptnu [ --TEST-- BitSet BitSet::nextSetBit() - Verifies the next set bit is valid based on the provided index --SKIPIF-- --FILE-- set(20); $b->set(18); var_dump($b->nextSetBit(0)); var_dump($b->nextSetBit(20)); var_dump($b->nextSetBit(18)); var_dump($b->nextSetBit(5)); try { var_dump($b->nextSetBit(63)); } catch (Exception $e) { echo get_class($e).': '.$e->getMessage()."\n"; } ?> --EXPECT-- int(18) bool(false) int(20) int(18) InvalidArgumentException: There are no bits larger than the index provided PK T\-g g tests/BitSet_previousSetBit.phptnu [ --TEST-- BitSet BitSet::previousSetBit() - Verifies the previous set bit is valid based on the provided index --SKIPIF-- --FILE-- set(20); $b->set(18); try { var_dump($b->previousSetBit(0)); } catch (Exception $e) { var_dump(get_class($e).': '.$e->getMessage()); } var_dump($b->previousSetBit(20)); var_dump($b->previousSetBit(18)); $b->set(1); var_dump($b->previousSetBit(5)); try { var_dump($b->previousSetBit(65)); } catch (Exception $e) { var_dump(get_class($e).': '.$e->getMessage()); } ?> --EXPECT-- string(75) "InvalidArgumentException: There are no bits smaller than the index provided" int(18) bool(false) int(1) string(93) "OutOfRangeException: The specified index parameter exceeds the total number of bits available" PK T\d tests/BitSet_isEmpty.phptnu [ --TEST-- BitSet BitSet::isEmpty() - Verifies that isEmpty truly checks for all off bits --SKIPIF-- --FILE-- isEmpty()); $b->set(32); var_dump($b->isEmpty()); $b->clear(32); $b->set(40); $b->clear(40); var_dump($b->isEmpty()); ?> --EXPECT-- bool(true) bool(false) bool(true) PK T\}