THRIFT-1651 Support annotations on all elements
Patch: Benjy Weinberger
git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1386848 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/test/AnnotationTest.thrift b/test/AnnotationTest.thrift
index 1a34320..dac476f 100644
--- a/test/AnnotationTest.thrift
+++ b/test/AnnotationTest.thrift
@@ -30,5 +30,33 @@
java.final = "",
)
-typedef string ( unicode.encoding = "UTF-16" ) non_latin_string
+exception foo_error {
+ 1: i32 error_code ( foo="bar" )
+ 2: string error_msg
+} (foo = "bar")
+
+typedef string ( unicode.encoding = "UTF-16" ) non_latin_string (foo="bar")
typedef list< double ( cpp.fixed_point = "16" ) > tiny_float_list
+
+enum weekdays {
+ SUNDAY ( weekend = "yes" ),
+ MONDAY,
+ TUESDAY,
+ WEDNESDAY,
+ THURSDAY,
+ FRIDAY,
+ SATURDAY ( weekend = "yes" )
+} (foo.bar="baz")
+
+/* Note that annotations on senum values are not supported. */
+senum seasons {
+ "Spring",
+ "Summer",
+ "Fall",
+ "Winter"
+} ( foo = "bar" )
+
+service foo_service {
+ void foo() ( foo = "bar" )
+} (a.b="c")
+