Linux unitednationsplay.com 3.10.0-1160.45.1.el7.x86_64 #1 SMP Wed Oct 13 17:20:51 UTC 2021 x86_64
nginx/1.20.1
Server IP : 188.130.139.92 & Your IP : 18.188.73.229
Domains :
Cant Read [ /etc/named.conf ]
User : web
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
home /
www /
3 /
bacon /
bacon-qr-code /
test /
Common /
Delete
Unzip
Name
Size
Permission
Date
Action
BitArrayTest.php
5.91
KB
-rw-r--r--
2020-10-30 09:00
BitMatrixTest.php
3.16
KB
-rw-r--r--
2020-10-30 09:00
BitUtilsTest.php
784
B
-rw-r--r--
2020-10-30 09:00
ErrorCorrectionLevelTest.php
783
B
-rw-r--r--
2020-10-30 09:00
FormatInformationTest.php
2.92
KB
-rw-r--r--
2020-10-30 09:00
ModeTest.php
534
B
-rw-r--r--
2020-10-30 09:00
ReedSolomonCodecTest.php
3.04
KB
-rw-r--r--
2020-10-30 09:00
VersionTest.php
2.26
KB
-rw-r--r--
2020-10-30 09:00
Save
Rename
<?php declare(strict_types = 1); namespace BaconQrCodeTest\Common; use BaconQrCode\Common\ErrorCorrectionLevel; use BaconQrCode\Common\FormatInformation; use PHPUnit\Framework\TestCase; class FormatInformationTest extends TestCase { private const MASKED_TEST_FORMAT_INFO = 0x2bed; private const UNMAKSED_TEST_FORMAT_INFO = self::MASKED_TEST_FORMAT_INFO ^ 0x5412; public function testBitsDiffering() : void { $this->assertSame(0, FormatInformation::numBitsDiffering(1, 1)); $this->assertSame(1, FormatInformation::numBitsDiffering(0, 2)); $this->assertSame(2, FormatInformation::numBitsDiffering(1, 2)); $this->assertEquals(32, FormatInformation::numBitsDiffering(-1, 0)); } public function testDecode() : void { $expected = FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO, self::MASKED_TEST_FORMAT_INFO ); $this->assertNotNull($expected); $this->assertSame(7, $expected->getDataMask()); $this->assertSame(ErrorCorrectionLevel::Q(), $expected->getErrorCorrectionLevel()); $this->assertEquals( $expected, FormatInformation::decodeFormatInformation( self::UNMAKSED_TEST_FORMAT_INFO, self::MASKED_TEST_FORMAT_INFO ) ); } public function testDecodeWithBitDifference() : void { $expected = FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO, self::MASKED_TEST_FORMAT_INFO ); $this->assertEquals( $expected, FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO ^ 0x1, self::MASKED_TEST_FORMAT_INFO ^ 0x1 ) ); $this->assertEquals( $expected, FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO ^ 0x3, self::MASKED_TEST_FORMAT_INFO ^ 0x3 ) ); $this->assertEquals( $expected, FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO ^ 0x7, self::MASKED_TEST_FORMAT_INFO ^ 0x7 ) ); $this->assertNull( FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO ^ 0xf, self::MASKED_TEST_FORMAT_INFO ^ 0xf ) ); } public function testDecodeWithMisRead() : void { $expected = FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO, self::MASKED_TEST_FORMAT_INFO ); $this->assertEquals( $expected, FormatInformation::decodeFormatInformation( self::MASKED_TEST_FORMAT_INFO ^ 0x3, self::MASKED_TEST_FORMAT_INFO ^ 0xf ) ); } }