Skip to content

Commit 5323dff

Browse files
committed
Remove object cast sum tests
1 parent 7f6a9af commit 5323dff

File tree

3 files changed

+0
-40
lines changed

3 files changed

+0
-40
lines changed

tests/Map/sum.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,4 @@ public function testSum($values, $expected)
3535
$instance = $this->getInstance($values);
3636
$this->assertEquals($expected, $instance->sum());
3737
}
38-
39-
public function testSumObjectCasting()
40-
{
41-
if ( ! extension_loaded('gmp')) {
42-
$this->markTestSkipped("GMP extension is not installed");
43-
return;
44-
}
45-
46-
$instance = $this->getInstance([1, 2, gmp_init(42)]);
47-
$this->assertEquals(45, $instance->sum());
48-
}
4938
}

tests/Sequence/sum.php

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -35,22 +35,4 @@ public function testSum($values, $expected)
3535
$instance = $this->getInstance($values);
3636
$this->assertEquals($expected, $instance->sum());
3737
}
38-
39-
public function testSumObjectCasting()
40-
{
41-
$this->markTestIncomplete(<<<TEXT
42-
Polyfill implementation is unable to convert gmp_init(42) to 42.
43-
Ext's ADD_TO_SUM https://github.com/php-ds/ext-ds/blob/2ddef84d3e9391c37599cb716592184315e23921/src/common.h#L87 is similar to PHP_FUNCTION(array_sum) https://github.com/php/php-src/blob/34f727e63716dfb798865289c079b017812ad03b/ext/standard/array.c#L5868 that is called within polyfill.
44-
Both call convert_scalar_to_number().
45-
TEXT
46-
);
47-
48-
if ( ! extension_loaded('gmp')) {
49-
$this->markTestSkipped("GMP extension is not installed");
50-
return;
51-
}
52-
53-
$instance = $this->getInstance([1, 2, gmp_init(42)]);
54-
$this->assertEquals(45, $instance->sum());
55-
}
5638
}

tests/Set/sum.php

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,15 +35,4 @@ public function testSum($values, $expected)
3535
$instance = $this->getInstance($values);
3636
$this->assertEquals($expected, $instance->sum());
3737
}
38-
39-
public function testSumObjectCasting()
40-
{
41-
if ( ! extension_loaded('gmp')) {
42-
$this->markTestSkipped("GMP extension is not installed");
43-
return;
44-
}
45-
46-
$instance = $this->getInstance([1, 2, gmp_init(42)]);
47-
$this->assertEquals(45, $instance->sum());
48-
}
4938
}

0 commit comments

Comments
 (0)