summaryrefslogtreecommitdiff
path: root/test/perl
diff options
context:
space:
mode:
authorNobuaki Sukegawa <nsukeg@gmail.com>2015-09-21 13:53:25 +0900
committerRoger Meier <roger@apache.org>2015-09-21 23:07:39 +0200
commita649e7473bd0229f160332f0c80407ba49765065 (patch)
tree44dea5abd7123a132851b6e1e181bf6caf3d3a44 /test/perl
parent245c347b7374182f8142ac07e43473ddd8c4d0de (diff)
downloadthrift-a649e7473bd0229f160332f0c80407ba49765065.tar.gz
THRIFT-3337 Add testBool method to cross tests
This closes #611
Diffstat (limited to 'test/perl')
-rwxr-xr-xtest/perl/TestClient.pl11
-rw-r--r--test/perl/TestServer.pl8
2 files changed, 19 insertions, 0 deletions
diff --git a/test/perl/TestClient.pl b/test/perl/TestClient.pl
index 0f1ce6577..40f8f59c4 100755
--- a/test/perl/TestClient.pl
+++ b/test/perl/TestClient.pl
@@ -133,6 +133,17 @@ my $s = $testClient->testString("Test");
print(" = \"$s\"\n");
#
+# BOOL TEST
+#
+print("testBool(1)");
+my $u8 = $testClient->testBool(1);
+print(" = $u8\n");
+print("testBool(0)");
+my $u8 = $testClient->testBool(0);
+print(" = $u8\n");
+
+
+#
# BYTE TEST
#
print("testByte(1)");
diff --git a/test/perl/TestServer.pl b/test/perl/TestServer.pl
index 57a136766..eebebc82d 100644
--- a/test/perl/TestServer.pl
+++ b/test/perl/TestServer.pl
@@ -148,6 +148,14 @@ sub testString() {
return $thing;
}
+sub testBool() {
+ my $self = shift;
+ my $thing = shift;
+ my $str = $thing ? "true" : "false";
+ print("testBool($str)\n");
+ return $thing;
+}
+
sub testByte() {
my $self = shift;
my $thing = shift;