THRIFT-225. java/cpp: Handle non-i32 integer constants properly

Java generates a warning when converting from an integer constant
to a byte or short without an explicit cast.  This change adds a
cast to byte and short literals in Java.

Both Java and C++ fail to compile integer literals larger than 2^31
unless they are decorated with "L" (for Java) or "LL" (for g++).
This change adds the appropriate decorations.


git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@727130 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/DebugProtoTest.thrift b/test/DebugProtoTest.thrift
index 515635e..e8eb9a3 100644
--- a/test/DebugProtoTest.thrift
+++ b/test/DebugProtoTest.thrift
@@ -15,15 +15,18 @@
 struct OneOfEach {
   1: bool im_true,
   2: bool im_false,
-  3: byte a_bite,
-  4: i16 integer16,
+  3: byte a_bite = 200,
+  4: i16 integer16 = 33000,
   5: i32 integer32,
-  6: i64 integer64,
+  6: i64 integer64 = 10000000000,
   7: double double_precision,
   8: string some_characters,
   9: string zomg_unicode,
   10: bool what_who,
   11: binary base64,
+  12: list<byte> byte_list = [1, 2, 3],
+  13: list<i16> i16_list = [1,2,3],
+  14: list<i64> i64_list = [1,2,3]
 }
 
 struct Bonk {