Pinq\Tests\Integration\Scheme\SetTest::testThatSetUsesStrictEquality PHP Method

testThatSetUsesStrictEquality() public method

public testThatSetUsesStrictEquality ( Pinq\Iterators\ISet $set )
$set Pinq\Iterators\ISet
    public function testThatSetUsesStrictEquality(ISet $set)
    {
        $nonIdenticalPairs = [[1, 1.0], [1, '1'], [false, []], [false, 0], [true, '1'], [new \stdClass(), new \stdClass()], [[1], ['1']], [[0 => 0], ['00' => 0]], [[0 => 1, 1 => 2, 2 => 3], [0 => 3, 1 => 2, 2 => 1]]];
        foreach ($nonIdenticalPairs as $nonIdenticalPair) {
            list($value1, $value2) = $nonIdenticalPair;
            $this->assertTrue($set->add($value1));
            $this->assertCount(1, $set);
            $this->assertTrue($set->add($value2));
            $this->assertCount(2, $set);
            $set->clear();
        }
    }