@@ 359-369 (lines=11) @@ | ||
356 | $this->assertSame(3, $enumSet->count()); |
|
357 | } |
|
358 | ||
359 | public function testSetBinaryBitsetLe() |
|
360 | { |
|
361 | $enumSet = new EnumSet('MabeEnumTest\TestAsset\Enum65'); |
|
362 | $enumSet->setBinaryBitsetLe("\x01\x00\x00\x00\x00\x00\x00\x80\x01"); |
|
363 | ||
364 | $this->assertTrue($enumSet->contains(Enum65::ONE)); |
|
365 | $this->assertFalse($enumSet->contains(Enum65::TWO)); |
|
366 | $this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
|
367 | $this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
|
368 | $this->assertTrue($enumSet->count() == 3); |
|
369 | } |
|
370 | ||
371 | public function testSetBinaryBitsetBe() |
|
372 | { |
|
@@ 371-381 (lines=11) @@ | ||
368 | $this->assertTrue($enumSet->count() == 3); |
|
369 | } |
|
370 | ||
371 | public function testSetBinaryBitsetBe() |
|
372 | { |
|
373 | $enumSet = new EnumSet('MabeEnumTest\TestAsset\Enum65'); |
|
374 | $enumSet->setBinaryBitsetBe("\x01\x80\x00\x00\x00\x00\x00\x00\x01"); |
|
375 | ||
376 | $this->assertTrue($enumSet->contains(Enum65::ONE)); |
|
377 | $this->assertFalse($enumSet->contains(Enum65::TWO)); |
|
378 | $this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
|
379 | $this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
|
380 | $this->assertTrue($enumSet->count() == 3); |
|
381 | } |
|
382 | ||
383 | /** |
|
384 | * @deprecated |
|
@@ 386-396 (lines=11) @@ | ||
383 | /** |
|
384 | * @deprecated |
|
385 | */ |
|
386 | public function testSetBitset() |
|
387 | { |
|
388 | $enumSet = new EnumSet('MabeEnumTest\TestAsset\Enum65'); |
|
389 | $enumSet->setBitset("\x01\x80\x00\x00\x00\x00\x00\x00\x01"); |
|
390 | ||
391 | $this->assertTrue($enumSet->contains(Enum65::ONE)); |
|
392 | $this->assertFalse($enumSet->contains(Enum65::TWO)); |
|
393 | $this->assertTrue($enumSet->contains(Enum65::SIXTYFIVE)); |
|
394 | $this->assertTrue($enumSet->contains(Enum65::SIXTYFOUR)); |
|
395 | $this->assertTrue($enumSet->count() == 3); |
|
396 | } |
|
397 | ||
398 | public function testSetBinaryBitsetLeShort() |
|
399 | { |