diff options
author | Dwayne Boone <dwayne@zeroc.com> | 2015-02-13 10:46:43 -0330 |
---|---|---|
committer | Dwayne Boone <dwayne@zeroc.com> | 2015-02-13 10:46:43 -0330 |
commit | 2a1addeb46f903b57d06044cc2fd8ac107186514 (patch) | |
tree | 855ba6f0972fb3bf1407d01a205aca0d0108afa3 /php/test | |
parent | ICE-6214 gradle plugin not using default source set (diff) | |
download | ice-2a1addeb46f903b57d06044cc2fd8ac107186514.tar.bz2 ice-2a1addeb46f903b57d06044cc2fd8ac107186514.tar.xz ice-2a1addeb46f903b57d06044cc2fd8ac107186514.zip |
ICE-6306 added test for number ranges in scripting languages
Diffstat (limited to 'php/test')
-rw-r--r-- | php/test/Ice/operations/Client.php | 68 |
1 files changed, 68 insertions, 0 deletions
diff --git a/php/test/Ice/operations/Client.php b/php/test/Ice/operations/Client.php index 88d6aaaa7a1..b6ced5a47f3 100644 --- a/php/test/Ice/operations/Client.php +++ b/php/test/Ice/operations/Client.php @@ -118,6 +118,74 @@ function twoways($communicator, $p) { // + // Test invalid ranges for numbers. + // + try + { + $r = $p->opByte(0x01ff, 0x0f, $b); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + + try + { + $r = $p->opShortIntLong($SHORT_MAX + 1, 0, 0, $s, $i, $l); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + + try + { + $r = $p->opShortIntLong($SHORT_MIN - 1, 0, 0, $s, $i, $l); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + + try + { + $r = $p->opShortIntLong(0, $INT_MAX + 1, 0, $s, $i, $l); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + + try + { + $r = $p->opShortIntLong(0, $INT_MIN - 1, 0, $s, $i, $l); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + + try + { + $r = $p->opShortIntLong(0, 0, $LONG_MAX + 1, $s, $i, $l); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + + try + { + $r = $p->opShortIntLong(0, 0, $LONG_MIN - 1, $s, $i, $l); + test(false); + } + catch(InvalidArgumentException $ex) + { + } + } + + { + // // Verify that null is accepted for strings. // $r = $p->opString(null, null, $s); |