Page Menu
Home
Code
Search
Configure Global Search
Log In
Files
F1148769
GeoOctocubeTest.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Subscribers
None
GeoOctocubeTest.php
View Options
<?php
/**
* Unit testing : class GeoOctocube
*
* Zed. The immensity of stars. The HyperShip. The people.
*
* (c) 2010, Dereckson, some rights reserved.
* Released under BSD license.
*
* @package Zed
* @subpackage Tests
* @author S�bastien Santoro aka Dereckson <dereckson@espace-win.org>
* @copyright 2010 S�bastien Santoro aka Dereckson
* @license http://www.opensource.org/licenses/bsd-license.php BSD
* @version 0.1
* @link http://scherzo.dereckson.be/doc/zed
* @link http://zed.dereckson.be/
* @filesource
*/
use
PHPUnit\Framework\TestCase
;
require_once
(
__DIR__
.
'/../../includes/geo/octocube.php'
);
/**
* Test cases for the class GeoPlace
*/
class
GeoOctocubeTest
extends
TestCase
{
/**
* Tests the GeoPlace::is_valid_local_location($local_location) method.
*/
public
function
testGetSector
()
{
//Testing HyperShip Tower T2C3 format
$this
->
assertTrue
(
GeoOctocube
::
getSector
(
0
,
0
,
0
)
==
0
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(-
10
,
6
,
-
4
)
==
1
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(
10
,
6
,
-
4
)
==
2
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(-
10
,
-
6
,
-
4
)
==
3
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(
10
,
-
6
,
-
4
)
==
4
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(-
10
,
6
,
4
)
==
5
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(
10
,
6
,
4
)
==
6
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(-
10
,
-
6
,
4
)
==
7
);
$this
->
assertTrue
(
GeoOctocube
::
getSector
(
10
,
-
6
,
4
)
==
8
);
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Thu, Aug 7, 21:56 (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
24920
Default Alt Text
GeoOctocubeTest.php (1 KB)
Attached To
rZED Zed
Event Timeline
Log In to Comment