Permalink
Browse files

Add more tests for the new +0/-0 behaviour.

  • Loading branch information...
1 parent 3990641 commit dcd99c4b19a29f37859769216e56d9a3cf0d232d @mj mj committed with lstrojny Dec 26, 2012
Showing with 4 additions and 0 deletions.
  1. +4 −0 ext/filter/tests/filter_data.phpt
@@ -15,6 +15,8 @@ $data = "+0"; var_dump(filter_var($data, FILTER_VALIDATE_INT));
$data = "123"; var_dump(filter_var($data, FILTER_VALIDATE_INT));
$data = -123; var_dump(filter_var($data, FILTER_VALIDATE_INT));
$data = 0; var_dump(filter_var($data, FILTER_VALIDATE_INT));
+$data = -0; var_dump(filter_var($data, FILTER_VALIDATE_INT));
+$data = +0; var_dump(filter_var($data, FILTER_VALIDATE_INT));
$data = 123; var_dump(filter_var($data, FILTER_VALIDATE_INT));
$data = ""; var_dump(filter_var($data, FILTER_VALIDATE_INT));
echo "\n";
@@ -53,6 +55,8 @@ int(0)
int(123)
int(-123)
int(0)
+int(0)
+int(0)
int(123)
bool(false)

0 comments on commit dcd99c4

Please sign in to comment.