From 689c9ad49843879b957d975e24fbb01404bfff79 Mon Sep 17 00:00:00 2001 From: David Reiss Date: Thu, 2 Apr 2009 19:24:02 +0000 Subject: [PATCH] THRIFT-420. Remove all negative structure field ids from the code git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@761393 13f79535-47bb-0310-9956-ffa450edef68 --- test/DebugProtoTest.thrift | 4 ++-- test/DenseLinkingTest.thrift | 2 +- test/FastbinaryTest.py | 7 ------- test/ThriftTest.thrift | 6 +++--- 4 files changed, 6 insertions(+), 13 deletions(-) diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift index 48a8d6ff..fb4ce071 100644 --- a/test/DebugProtoTest.thrift +++ b/test/DebugProtoTest.thrift @@ -163,7 +163,7 @@ struct CompactProtoTestStruct { service Srv { - i32 Janky(i32 arg); + i32 Janky(1: i32 arg); // return type only methods @@ -173,7 +173,7 @@ service Srv { } service Inherited extends Srv { - i32 identity(i32 arg) + i32 identity(1: i32 arg) } service EmptyService {} diff --git a/test/DenseLinkingTest.thrift b/test/DenseLinkingTest.thrift index a23ad205..cf61496a 100644 --- a/test/DenseLinkingTest.thrift +++ b/test/DenseLinkingTest.thrift @@ -88,5 +88,5 @@ struct RandomStuffZZ { } service Srv { - i32 Janky(i32 arg) + i32 Janky(1: i32 arg) } diff --git a/test/FastbinaryTest.py b/test/FastbinaryTest.py index e77b115c..7f6efae6 100755 --- a/test/FastbinaryTest.py +++ b/test/FastbinaryTest.py @@ -104,7 +104,6 @@ rshuge = RandomStuff() rshuge.myintlist=range(10000) my_zero = Srv.Janky_result({"arg":5}) -my_nega = Srv.Janky_args({"success":6}) def checkWrite(o): trans_fast = TTransport.TMemoryBuffer() @@ -159,12 +158,6 @@ def doTest(): checkWrite(my_zero) checkRead(my_zero) checkRead(Backwards({"first_tag2":4, "second_tag1":2})) - try: - checkWrite(my_nega) - print "Hey, did this get fixed?" - except AttributeError: - # Sorry, doesn't work with negative tags. - pass # One case where the serialized form changes, but only superficially. o = Backwards({"first_tag2":4, "second_tag1":2}) diff --git a/test/ThriftTest.thrift b/test/ThriftTest.thrift index b776e29f..3517640a 100644 --- a/test/ThriftTest.thrift +++ b/test/ThriftTest.thrift @@ -120,15 +120,15 @@ service ThriftTest map> testInsanity(1: Insanity argument), /* Multiple parameters */ - Xtruct testMulti(byte arg0, i32 arg1, i64 arg2, map arg3, Numberz arg4, UserId arg5), + Xtruct testMulti(1: byte arg0, 2: i32 arg1, 3: i64 arg2, 4: map arg3, 5: Numberz arg4, 6: UserId arg5), /* Exception specifier */ - void testException(string arg) throws(Xception err1), + void testException(1: string arg) throws(1: Xception err1), /* Multiple exceptions specifier */ - Xtruct testMultiException(string arg0, string arg1) throws(Xception err1, Xception2 err2) + Xtruct testMultiException(1: string arg0, 2: string arg1) throws(1: Xception err1, 2: Xception2 err2) /* Test oneway void */ oneway void testOneway(1:i32 secondsToSleep) -- 2.17.1