Skip to content

Commit

Permalink
Fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
santiagolizardo committed May 24, 2015
1 parent 2f859a2 commit e01f3de
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 55 deletions.
2 changes: 0 additions & 2 deletions power.c
Expand Up @@ -64,11 +64,9 @@ PHP_FUNCTION(SDL_GetPowerInfo)
power_state = SDL_GetPowerInfo(has_secs ? &secs : NULL, has_pct ? &pct : NULL);

if (has_secs) {
zval_dtor(z_secs);
ZVAL_LONG(z_secs, (long)secs);
}
if (has_pct) {
zval_dtor(z_pct);
ZVAL_LONG(z_pct, (long)pct);
}

Expand Down
26 changes: 0 additions & 26 deletions tests/005-video.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/005-video.phpt
Expand Up @@ -43,7 +43,7 @@ int(0)
SDL_VideoInit():int(0)
SDL_GetCurrentVideoDriver():string(%d) "%s"
SDL_GetNumVideoDisplays():int(%d)
SDL_GetDisplayName(0):string(17) "%s"
SDL_GetDisplayName(0):string(9) "Color LCD"
SDL_GetDisplayBounds(0):int(0)
object(SDL_Rect)#1 (4) {
["x"]=>
Expand Down
18 changes: 0 additions & 18 deletions tests/018-power.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/018-power.phpt
Expand Up @@ -18,7 +18,7 @@ $secs = $pct = null;
$powerStates = array(SDL_POWERSTATE_UNKNOWN, SDL_POWERSTATE_ON_BATTERY, SDL_POWERSTATE_NO_BATTERY, SDL_POWERSTATE_CHARGING, SDL_POWERSTATE_CHARGED);
var_dump(in_array(SDL_GetPowerInfo(), $powerStates));
var_dump(in_array(SDL_GetPowerInfo($secs, $pct), $powerStates));
var_dump($secs >= -1 && $secs <= 100);
var_dump($secs >= -1);
var_dump($pct >= -1 && $pct <= 100);

echo '= Done', PHP_EOL;
Expand Down
5 changes: 0 additions & 5 deletions tests/026-filesystem.php

This file was deleted.

10 changes: 8 additions & 2 deletions tests/026-filesystem.phpt
Expand Up @@ -6,9 +6,15 @@ if (!extension_loaded("sdl")) die("skip SDL extension not loaded");
?>
--FILE--
<?php
var_dump(SDL_GetPrefPath());
var_dump(SDL_GetBasePath());
$prefPath = SDL_GetPrefPath('my_org', 'my_app');
var_dump(strpos($prefPath, 'my_org') !== false);
var_dump(strpos($prefPath, 'my_app') !== false);
$basePath = SDL_GetBasePath();
var_dump(strpos($basePath, DIRECTORY_SEPARATOR) !== false);
?>
+ Done
--EXPECTF--
bool(true)
bool(true)
bool(true)
+ Done

0 comments on commit e01f3de

Please sign in to comment.