Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F6143942
FloatTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
736 B
Referenced Files
None
Subscribers
None
FloatTest.php
View Options
<?php
use
Eris\Generators
;
class
FloatTest
extends
\PHPUnit\Framework\TestCase
{
use
Eris\TestTrait
;
public
function
testAPropertyHoldingForAllNumbers
()
{
$this
->
forAll
(
Generators
::
float
())
->
then
(
function
(
$number
)
{
$this
->
assertEquals
(
0.0
,
abs
(
$number
)
-
abs
(
$number
)
);
});
}
public
function
testAPropertyHoldingOnlyForPositiveNumbers
()
{
$this
->
forAll
(
Generators
::
float
())
->
then
(
function
(
$number
)
{
$this
->
assertTrue
(
$number
>=
0
,
"$number is not a (loosely) positive number"
);
});
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Oct 7 2026, 20:42 (6 w, 5 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
9f/4c/44e3fa1dc520a77418b686154ac3
Default Alt Text
FloatTest.php (736 B)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment