init web ems all
This commit is contained in:
1 parent
81c97acbe9
commit
5cc56f8078
4263 files changed
+798779
No files matched your search
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
/**
|
||||
* BaconQrCode
|
||||
*
|
||||
* @link http://github.com/Bacon/BaconQrCode For the canonical source repository
|
||||
* @copyright 2013 Ben 'DASPRiD' Scholzen
|
||||
* @license http://opensource.org/licenses/BSD-2-Clause Simplified BSD License
|
||||
*/
|
||||
|
||||
namespace BaconQrCode\Common;
|
||||
|
||||
use PHPUnit_Framework_TestCase as TestCase;
|
||||
|
||||
class BitUtilsTest extends TestCase
|
||||
{
|
||||
public function testUnsignedRightShift()
|
||||
{
|
||||
$this->assertEquals(1, BitUtils::unsignedRightShift(1, 0));
|
||||
$this->assertEquals(1, BitUtils::unsignedRightShift(10, 3));
|
||||
$this->assertEquals(536870910, BitUtils::unsignedRightShift(-10, 3));
|
||||
}
|
||||
|
||||
public function testNumberOfTrailingZeros()
|
||||
{
|
||||
$this->assertEquals(32, BitUtils::numberOfTrailingZeros(0));
|
||||
$this->assertEquals(1, BitUtils::numberOfTrailingZeros(10));
|
||||
$this->assertEquals(0, BitUtils::numberOfTrailingZeros(15));
|
||||
$this->assertEquals(2, BitUtils::numberOfTrailingZeros(20));
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user