T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 1 | #!/usr/bin/env perl |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 2 | |
David Reiss | ea2cba8 | 2009-03-30 21:35:00 +0000 | [diff] [blame] | 3 | # |
| 4 | # Licensed to the Apache Software Foundation (ASF) under one |
| 5 | # or more contributor license agreements. See the NOTICE file |
| 6 | # distributed with this work for additional information |
| 7 | # regarding copyright ownership. The ASF licenses this file |
| 8 | # to you under the Apache License, Version 2.0 (the |
| 9 | # "License"); you may not use this file except in compliance |
| 10 | # with the License. You may obtain a copy of the License at |
| 11 | # |
| 12 | # http://www.apache.org/licenses/LICENSE-2.0 |
| 13 | # |
| 14 | # Unless required by applicable law or agreed to in writing, |
| 15 | # software distributed under the License is distributed on an |
| 16 | # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 17 | # KIND, either express or implied. See the License for the |
| 18 | # specific language governing permissions and limitations |
| 19 | # under the License. |
| 20 | # |
| 21 | |
James E. King, III | 177c37c | 2017-03-30 17:09:04 -0400 | [diff] [blame] | 22 | use 5.10.0; |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 23 | use strict; |
| 24 | use warnings; |
| 25 | use Data::Dumper; |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 26 | use Getopt::Long qw(GetOptions); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 27 | use Time::HiRes qw(gettimeofday); |
| 28 | |
| 29 | use lib '../../lib/perl/lib'; |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 30 | use lib 'gen-perl'; |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 31 | |
| 32 | use Thrift; |
| 33 | use Thrift::BinaryProtocol; |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 34 | use Thrift::BufferedTransport; |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 35 | use Thrift::FramedTransport; |
| 36 | use Thrift::SSLSocket; |
| 37 | use Thrift::Socket; |
James E. King, III | 49f4dc0 | 2015-10-29 15:52:23 -0400 | [diff] [blame] | 38 | use Thrift::UnixSocket; |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 39 | |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 40 | use ThriftTest::ThriftTest; |
Mark Slee | 27ed6ec | 2007-08-16 01:26:31 +0000 | [diff] [blame] | 41 | use ThriftTest::Types; |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 42 | |
| 43 | $|++; |
| 44 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 45 | sub usage { |
| 46 | print <<EOF; |
| 47 | Usage: $0 [OPTIONS] |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 48 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 49 | Options: (default) |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 50 | --ca CA to validate server with. |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 51 | --cert Certificate to use. |
| 52 | Required if using --ssl. |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 53 | --ciphers Acceptable cipher list. |
James E. King, III | 49f4dc0 | 2015-10-29 15:52:23 -0400 | [diff] [blame] | 54 | --domain-socket <file> Use a unix domain socket. |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 55 | --help Show usage. |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 56 | --key Certificate key. |
| 57 | Required if using --ssl. |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 58 | --port <portnum> 9090 Port to use. |
| 59 | --protocol {binary} binary Protocol to use. |
| 60 | --ssl If present, use SSL. |
| 61 | --transport {buffered|framed} buffered Transport to use. |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 62 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 63 | EOF |
Roger Meier | 41ad434 | 2015-03-24 22:30:40 +0100 | [diff] [blame] | 64 | } |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 65 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 66 | my %opts = ( |
| 67 | 'port' => 9090, |
| 68 | 'protocol' => 'binary', |
| 69 | 'transport' => 'buffered' |
| 70 | ); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 71 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 72 | GetOptions(\%opts, qw ( |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 73 | ca=s |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 74 | cert=s |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 75 | ciphers=s |
| 76 | key=s |
James E. King, III | 49f4dc0 | 2015-10-29 15:52:23 -0400 | [diff] [blame] | 77 | domain-socket=s |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 78 | help |
| 79 | host=s |
| 80 | port=i |
| 81 | protocol=s |
| 82 | ssl |
| 83 | transport=s |
| 84 | )) || exit 1; |
| 85 | |
| 86 | if ($opts{help}) { |
| 87 | usage(); |
| 88 | exit 0; |
| 89 | } |
| 90 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 91 | my $socket = undef; |
James E. King, III | 49f4dc0 | 2015-10-29 15:52:23 -0400 | [diff] [blame] | 92 | if ($opts{"domain-socket"}) { |
| 93 | $socket = new Thrift::UnixSocket($opts{"domain-socket"}); |
| 94 | } elsif ($opts{ssl}) { |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 95 | $socket = new Thrift::SSLSocket(\%opts); |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 96 | } else { |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 97 | $socket = new Thrift::Socket($opts{host}, $opts{port}); |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 98 | } |
| 99 | |
| 100 | my $transport; |
| 101 | if ($opts{transport} eq 'buffered') { |
| 102 | $transport = new Thrift::BufferedTransport($socket, 1024, 1024); |
| 103 | } elsif ($opts{transport} eq 'framed') { |
| 104 | $transport = new Thrift::FramedTransport($socket); |
| 105 | } else { |
| 106 | usage(); |
| 107 | exit 1; |
| 108 | } |
| 109 | |
| 110 | my $protocol; |
| 111 | if ($opts{protocol} eq 'binary') { |
| 112 | $protocol = new Thrift::BinaryProtocol($transport); |
| 113 | } else { |
| 114 | usage(); |
| 115 | exit 1; |
| 116 | } |
| 117 | |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 118 | my $testClient = new ThriftTest::ThriftTestClient($protocol); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 119 | |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 120 | eval { |
| 121 | $transport->open(); |
James E. King, III | 377719c | 2017-02-15 14:33:20 -0500 | [diff] [blame] | 122 | }; |
Jim King | f5f1b35 | 2015-06-24 13:47:24 -0400 | [diff] [blame] | 123 | if($@){ |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 124 | die(Dumper($@)); |
| 125 | } |
| 126 | my $start = gettimeofday(); |
| 127 | |
| 128 | # |
| 129 | # VOID TEST |
| 130 | # |
| 131 | print("testVoid()"); |
| 132 | $testClient->testVoid(); |
| 133 | print(" = void\n"); |
| 134 | |
| 135 | # |
| 136 | # STRING TEST |
| 137 | # |
| 138 | print("testString(\"Test\")"); |
| 139 | my $s = $testClient->testString("Test"); |
| 140 | print(" = \"$s\"\n"); |
| 141 | |
| 142 | # |
Nobuaki Sukegawa | a649e74 | 2015-09-21 13:53:25 +0900 | [diff] [blame] | 143 | # BOOL TEST |
| 144 | # |
| 145 | print("testBool(1)"); |
Jens Geyer | d629ea0 | 2015-09-23 21:16:50 +0200 | [diff] [blame] | 146 | my $t = $testClient->testBool(1); |
| 147 | print(" = $t\n"); |
Nobuaki Sukegawa | a649e74 | 2015-09-21 13:53:25 +0900 | [diff] [blame] | 148 | print("testBool(0)"); |
Jens Geyer | d629ea0 | 2015-09-23 21:16:50 +0200 | [diff] [blame] | 149 | my $f = $testClient->testBool(0); |
| 150 | print(" = $f\n"); |
Nobuaki Sukegawa | a649e74 | 2015-09-21 13:53:25 +0900 | [diff] [blame] | 151 | |
| 152 | |
| 153 | # |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 154 | # BYTE TEST |
| 155 | # |
| 156 | print("testByte(1)"); |
| 157 | my $u8 = $testClient->testByte(1); |
| 158 | print(" = $u8\n"); |
| 159 | |
| 160 | # |
| 161 | # I32 TEST |
| 162 | # |
| 163 | print("testI32(-1)"); |
| 164 | my $i32 = $testClient->testI32(-1); |
| 165 | print(" = $i32\n"); |
| 166 | |
| 167 | # |
| 168 | #I64 TEST |
| 169 | # |
| 170 | print("testI64(-34359738368)"); |
| 171 | my $i64 = $testClient->testI64(-34359738368); |
| 172 | print(" = $i64\n"); |
| 173 | |
| 174 | # |
| 175 | # DOUBLE TEST |
| 176 | # |
| 177 | print("testDouble(-852.234234234)"); |
| 178 | my $dub = $testClient->testDouble(-852.234234234); |
| 179 | print(" = $dub\n"); |
| 180 | |
| 181 | # |
Jens Geyer | 8bcfdd9 | 2014-12-14 03:14:26 +0100 | [diff] [blame] | 182 | # BINARY TEST --- TODO |
| 183 | # |
| 184 | |
| 185 | |
| 186 | # |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 187 | # STRUCT TEST |
| 188 | # |
| 189 | print("testStruct({\"Zero\", 1, -3, -5})"); |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 190 | my $out = new ThriftTest::Xtruct(); |
| 191 | $out->string_thing("Zero"); |
| 192 | $out->byte_thing(1); |
| 193 | $out->i32_thing(-3); |
| 194 | $out->i64_thing(-5); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 195 | my $in = $testClient->testStruct($out); |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 196 | print(" = {\"".$in->string_thing."\", ". |
| 197 | $in->byte_thing.", ". |
| 198 | $in->i32_thing.", ". |
| 199 | $in->i64_thing."}\n"); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 200 | |
| 201 | # |
| 202 | # NESTED STRUCT TEST |
| 203 | # |
| 204 | print("testNest({1, {\"Zero\", 1, -3, -5}, 5}"); |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 205 | my $out2 = new ThriftTest::Xtruct2(); |
| 206 | $out2->byte_thing(1); |
| 207 | $out2->struct_thing($out); |
| 208 | $out2->i32_thing(5); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 209 | my $in2 = $testClient->testNest($out2); |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 210 | $in = $in2->struct_thing; |
| 211 | print(" = {".$in2->byte_thing.", {\"". |
| 212 | $in->string_thing."\", ". |
| 213 | $in->byte_thing.", ". |
| 214 | $in->i32_thing.", ". |
| 215 | $in->i64_thing."}, ". |
| 216 | $in2->i32_thing."}\n"); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 217 | |
| 218 | # |
| 219 | # MAP TEST |
| 220 | # |
| 221 | my $mapout = {}; |
| 222 | for (my $i = 0; $i < 5; ++$i) { |
| 223 | $mapout->{$i} = $i-10; |
| 224 | } |
| 225 | print("testMap({"); |
| 226 | my $first = 1; |
| 227 | while( my($key,$val) = each %$mapout) { |
| 228 | if ($first) { |
| 229 | $first = 0; |
| 230 | } else { |
| 231 | print(", "); |
| 232 | } |
| 233 | print("$key => $val"); |
| 234 | } |
| 235 | print("})"); |
| 236 | |
| 237 | |
| 238 | my $mapin = $testClient->testMap($mapout); |
| 239 | print(" = {"); |
| 240 | |
| 241 | $first = 1; |
| 242 | while( my($key,$val) = each %$mapin){ |
| 243 | if ($first) { |
| 244 | $first = 0; |
| 245 | } else { |
| 246 | print(", "); |
| 247 | } |
| 248 | print("$key => $val"); |
| 249 | } |
| 250 | print("}\n"); |
| 251 | |
| 252 | # |
| 253 | # SET TEST |
| 254 | # |
| 255 | my $setout = []; |
| 256 | for (my $i = -2; $i < 3; ++$i) { |
| 257 | push(@$setout, $i); |
| 258 | } |
| 259 | |
| 260 | print("testSet({".join(",",@$setout)."})"); |
| 261 | |
| 262 | my $setin = $testClient->testSet($setout); |
| 263 | |
| 264 | print(" = {".join(",",@$setout)."}\n"); |
| 265 | |
| 266 | # |
| 267 | # LIST TEST |
| 268 | # |
| 269 | my $listout = []; |
| 270 | for (my $i = -2; $i < 3; ++$i) { |
| 271 | push(@$listout, $i); |
| 272 | } |
| 273 | |
| 274 | print("testList({".join(",",@$listout)."})"); |
| 275 | |
| 276 | my $listin = $testClient->testList($listout); |
| 277 | |
| 278 | print(" = {".join(",",@$listin)."}\n"); |
| 279 | |
| 280 | # |
| 281 | # ENUM TEST |
| 282 | # |
| 283 | print("testEnum(ONE)"); |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 284 | my $ret = $testClient->testEnum(ThriftTest::Numberz::ONE); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 285 | print(" = $ret\n"); |
| 286 | |
| 287 | print("testEnum(TWO)"); |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 288 | $ret = $testClient->testEnum(ThriftTest::Numberz::TWO); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 289 | print(" = $ret\n"); |
| 290 | |
| 291 | print("testEnum(THREE)"); |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 292 | $ret = $testClient->testEnum(ThriftTest::Numberz::THREE); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 293 | print(" = $ret\n"); |
| 294 | |
| 295 | print("testEnum(FIVE)"); |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 296 | $ret = $testClient->testEnum(ThriftTest::Numberz::FIVE); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 297 | print(" = $ret\n"); |
| 298 | |
| 299 | print("testEnum(EIGHT)"); |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 300 | $ret = $testClient->testEnum(ThriftTest::Numberz::EIGHT); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 301 | print(" = $ret\n"); |
| 302 | |
| 303 | # |
| 304 | # TYPEDEF TEST |
| 305 | # |
| 306 | print("testTypedef(309858235082523)"); |
| 307 | my $uid = $testClient->testTypedef(309858235082523); |
| 308 | print(" = $uid\n"); |
| 309 | |
| 310 | # |
| 311 | # NESTED MAP TEST |
| 312 | # |
| 313 | print("testMapMap(1)"); |
| 314 | my $mm = $testClient->testMapMap(1); |
| 315 | print(" = {"); |
| 316 | while( my ($key,$val) = each %$mm) { |
| 317 | print("$key => {"); |
| 318 | while( my($k2,$v2) = each %$val) { |
| 319 | print("$k2 => $v2, "); |
| 320 | } |
| 321 | print("}, "); |
| 322 | } |
| 323 | print("}\n"); |
| 324 | |
| 325 | # |
| 326 | # INSANITY TEST |
| 327 | # |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 328 | my $insane = new ThriftTest::Insanity(); |
T Jake Luciani | 41687fc | 2008-12-23 03:45:43 +0000 | [diff] [blame] | 329 | $insane->{userMap}->{ThriftTest::Numberz::FIVE} = 5000; |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 330 | my $truck = new ThriftTest::Xtruct(); |
Jens Geyer | d629ea0 | 2015-09-23 21:16:50 +0200 | [diff] [blame] | 331 | $truck->string_thing("Hello2"); |
| 332 | $truck->byte_thing(2); |
| 333 | $truck->i32_thing(2); |
| 334 | $truck->i64_thing(2); |
| 335 | my $truck2 = new ThriftTest::Xtruct(); |
| 336 | $truck2->string_thing("Goodbye4"); |
| 337 | $truck2->byte_thing(4); |
| 338 | $truck2->i32_thing(4); |
| 339 | $truck2->i64_thing(4); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 340 | push(@{$insane->{xtructs}}, $truck); |
Jens Geyer | d629ea0 | 2015-09-23 21:16:50 +0200 | [diff] [blame] | 341 | push(@{$insane->{xtructs}}, $truck2); |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 342 | |
| 343 | print("testInsanity()"); |
| 344 | my $whoa = $testClient->testInsanity($insane); |
| 345 | print(" = {"); |
| 346 | while( my ($key,$val) = each %$whoa) { |
| 347 | print("$key => {"); |
| 348 | while( my($k2,$v2) = each %$val) { |
| 349 | print("$k2 => {"); |
| 350 | my $userMap = $v2->{userMap}; |
| 351 | print("{"); |
| 352 | if (ref($userMap) eq "HASH") { |
| 353 | while( my($k3,$v3) = each %$userMap) { |
| 354 | print("$k3 => $v3, "); |
| 355 | } |
| 356 | } |
| 357 | print("}, "); |
| 358 | |
| 359 | my $xtructs = $v2->{xtructs}; |
| 360 | print("{"); |
| 361 | if (ref($xtructs) eq "ARRAY") { |
| 362 | foreach my $x (@$xtructs) { |
| 363 | print("{\"".$x->{string_thing}."\", ". |
| 364 | $x->{byte_thing}.", ".$x->{i32_thing}.", ".$x->{i64_thing}."}, "); |
| 365 | } |
| 366 | } |
| 367 | print("}"); |
| 368 | |
| 369 | print("}, "); |
| 370 | } |
| 371 | print("}, "); |
| 372 | } |
| 373 | print("}\n"); |
| 374 | |
| 375 | # |
| 376 | # EXCEPTION TEST |
| 377 | # |
| 378 | print("testException('Xception')"); |
| 379 | eval { |
| 380 | $testClient->testException('Xception'); |
| 381 | print(" void\nFAILURE\n"); |
Mark Slee | 8266443 | 2007-09-19 06:49:30 +0000 | [diff] [blame] | 382 | }; if($@ && $@->UNIVERSAL::isa('ThriftTest::Xception')) { |
Mark Slee | 3e3d7ad | 2007-05-16 02:35:58 +0000 | [diff] [blame] | 383 | print(' caught xception '.$@->{errorCode}.': '.$@->{message}."\n"); |
| 384 | } |
| 385 | |
| 386 | |
| 387 | # |
| 388 | # Normal tests done. |
| 389 | # |
| 390 | my $stop = gettimeofday(); |
| 391 | my $elp = sprintf("%d",1000*($stop - $start), 0); |
| 392 | print("Total time: $elp ms\n"); |
| 393 | |
| 394 | # |
| 395 | # Extraneous "I don't trust PHP to pack/unpack integer" tests |
| 396 | # |
| 397 | |
| 398 | # Max I32 |
| 399 | my $num = 2**30 + 2**30 - 1; |
| 400 | my $num2 = $testClient->testI32($num); |
| 401 | if ($num != $num2) { |
| 402 | print "Missed max32 $num = $num2\n"; |
| 403 | } |
| 404 | |
| 405 | # Min I32 |
| 406 | $num = 0 - 2**31; |
| 407 | $num2 = $testClient->testI32($num); |
| 408 | if ($num != $num2) { |
| 409 | print "Missed min32 $num = $num2\n"; |
| 410 | } |
| 411 | |
| 412 | # Max Number I can get out of my perl |
| 413 | $num = 2**40; |
| 414 | $num2 = $testClient->testI64($num); |
| 415 | if ($num != $num2) { |
| 416 | print "Missed max64 $num = $num2\n"; |
| 417 | } |
| 418 | |
| 419 | # Max Number I can get out of my perl |
| 420 | $num = 0 - 2**40; |
| 421 | $num2 = $testClient->testI64($num); |
| 422 | if ($num != $num2) { |
| 423 | print "Missed min64 $num = $num2\n"; |
| 424 | } |
| 425 | |
| 426 | $transport->close(); |
| 427 | |
| 428 | |
| 429 | |