|
@@ 354-364 (lines=11) @@
|
| 351 |
|
$this->assertSame(3, $enumSet->count()); |
| 352 |
|
} |
| 353 |
|
|
| 354 |
|
public function testSetBinaryBitsetLe() |
| 355 |
|
{ |
| 356 |
|
$enumSet = new EnumSet('MabeEnumTest\TestAsset\Enum65'); |
| 357 |
|
$enumSet->setBinaryBitsetLe("\x01\x00\x00\x00\x00\x00\x00\x80\x01"); |
| 358 |
|
|
| 359 |
|
$this->assertTrue($enumSet->contains(Enum65::ONE)); |
| 360 |
|
$this->assertFalse($enumSet->contains(Enum65::TWO)); |
| 361 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
| 362 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
| 363 |
|
$this->assertTrue($enumSet->count() == 3); |
| 364 |
|
} |
| 365 |
|
|
| 366 |
|
public function testSetBinaryBitsetLeTruncateHighBits() |
| 367 |
|
{ |
|
@@ 383-393 (lines=11) @@
|
| 380 |
|
$this->assertSame(bin2hex($bitset), bin2hex($enumSet->getBinaryBitsetLe())); |
| 381 |
|
} |
| 382 |
|
|
| 383 |
|
public function testSetBinaryBitsetBe() |
| 384 |
|
{ |
| 385 |
|
$enumSet = new EnumSet('MabeEnumTest\TestAsset\Enum65'); |
| 386 |
|
$enumSet->setBinaryBitsetBe("\x01\x80\x00\x00\x00\x00\x00\x00\x01"); |
| 387 |
|
|
| 388 |
|
$this->assertTrue($enumSet->contains(Enum65::ONE)); |
| 389 |
|
$this->assertFalse($enumSet->contains(Enum65::TWO)); |
| 390 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
| 391 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
| 392 |
|
$this->assertTrue($enumSet->count() == 3); |
| 393 |
|
} |
| 394 |
|
|
| 395 |
|
public function testSetBinaryBitsetLeShort() |
| 396 |
|
{ |