|
@@ 318-328 (lines=11) @@
|
| 315 |
|
$this->assertSame(3, $enumSet->count()); |
| 316 |
|
} |
| 317 |
|
|
| 318 |
|
public function testSetBinaryBitsetLe() |
| 319 |
|
{ |
| 320 |
|
$enumSet = new EnumSet(Enum65::class); |
| 321 |
|
$enumSet->setBinaryBitsetLe("\x01\x00\x00\x00\x00\x00\x00\x80\x01"); |
| 322 |
|
|
| 323 |
|
$this->assertTrue($enumSet->contains(Enum65::ONE)); |
| 324 |
|
$this->assertFalse($enumSet->contains(Enum65::TWO)); |
| 325 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
| 326 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
| 327 |
|
$this->assertTrue($enumSet->count() == 3); |
| 328 |
|
} |
| 329 |
|
|
| 330 |
|
public function testSetBinaryBitsetLeTruncateHighBits() |
| 331 |
|
{ |
|
@@ 347-357 (lines=11) @@
|
| 344 |
|
$this->assertSame(bin2hex($bitset), bin2hex($enumSet->getBinaryBitsetLe())); |
| 345 |
|
} |
| 346 |
|
|
| 347 |
|
public function testSetBinaryBitsetBe() |
| 348 |
|
{ |
| 349 |
|
$enumSet = new EnumSet(Enum65::class); |
| 350 |
|
$enumSet->setBinaryBitsetBe("\x01\x80\x00\x00\x00\x00\x00\x00\x01"); |
| 351 |
|
|
| 352 |
|
$this->assertTrue($enumSet->contains(Enum65::ONE)); |
| 353 |
|
$this->assertFalse($enumSet->contains(Enum65::TWO)); |
| 354 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
| 355 |
|
$this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
| 356 |
|
$this->assertTrue($enumSet->count() == 3); |
| 357 |
|
} |
| 358 |
|
|
| 359 |
|
public function testSetBinaryBitsetLeShort() |
| 360 |
|
{ |