summaryrefslogtreecommitdiff
path: root/test/rb
diff options
context:
space:
mode:
authorKevin Clark <kclark@apache.org>2009-01-14 23:55:10 +0000
committerKevin Clark <kclark@apache.org>2009-01-14 23:55:10 +0000
commitc85fd50e2b3308e84345e5e0045507c20e6c5626 (patch)
treee2d61d9dfb9c9ad04cf9de027269cb71f7d2aea1 /test/rb
parent46bb4aeb5e792b72810062f289151fde7d27a73b (diff)
downloadthrift-c85fd50e2b3308e84345e5e0045507c20e6c5626.tar.gz
THRIFT-216. Add validate method to fixtures so tests pass
Author: Esteve Fernandez git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@734565 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/rb')
-rw-r--r--test/rb/fixtures/structs.rb54
1 files changed, 54 insertions, 0 deletions
diff --git a/test/rb/fixtures/structs.rb b/test/rb/fixtures/structs.rb
index 82c291eca..0f0cfa82e 100644
--- a/test/rb/fixtures/structs.rb
+++ b/test/rb/fixtures/structs.rb
@@ -8,6 +8,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::BOOL, :name => 'bool'}
}
+
+ def validate
+ end
end
class OneByte
@@ -16,6 +19,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::BYTE, :name => 'byte'}
}
+
+ def validate
+ end
end
class OneI16
@@ -24,6 +30,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::I16, :name => 'i16'}
}
+
+ def validate
+ end
end
class OneI32
@@ -32,6 +41,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::I32, :name => 'i32'}
}
+
+ def validate
+ end
end
class OneI64
@@ -40,6 +52,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::I64, :name => 'i64'}
}
+
+ def validate
+ end
end
class OneDouble
@@ -48,6 +63,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::DOUBLE, :name => 'double'}
}
+
+ def validate
+ end
end
class OneString
@@ -56,6 +74,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::STRING, :name => 'string'}
}
+
+ def validate
+ end
end
class OneMap
@@ -64,6 +85,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::MAP, :name => 'map', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::STRING}}
}
+
+ def validate
+ end
end
class NestedMap
@@ -72,6 +96,9 @@ module Fixtures
FIELDS = {
0 => {:type => Thrift::Types::MAP, :name => 'map', :key => {:type => Thrift::Types::I32}, :value => {:type => Thrift::Types::MAP, :key => {:type => Thrift::Types::I32}, :value => {:type => Thrift::Types::I32}}}
}
+
+ def validate
+ end
end
class OneList
@@ -80,6 +107,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::LIST, :name => 'list', :element => {:type => Thrift::Types::STRING}}
}
+
+ def validate
+ end
end
class NestedList
@@ -88,6 +118,9 @@ module Fixtures
FIELDS = {
0 => {:type => Thrift::Types::LIST, :name => 'list', :element => {:type => Thrift::Types::LIST, :element => { :type => Thrift::Types::I32 } } }
}
+
+ def validate
+ end
end
class OneSet
@@ -96,6 +129,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::SET, :name => 'set', :element => {:type => Thrift::Types::STRING}}
}
+
+ def validate
+ end
end
class NestedSet
@@ -104,6 +140,9 @@ module Fixtures
FIELDS = {
1 => {:type => Thrift::Types::SET, :name => 'set', :element => {:type => Thrift::Types::SET, :element => { :type => Thrift::Types::STRING } }}
}
+
+ def validate
+ end
end
# struct OneOfEach {
@@ -144,6 +183,9 @@ module Fixtures
end
true
end
+
+ def validate
+ end
end
# struct Nested1 {
@@ -163,6 +205,9 @@ module Fixtures
4 => {:type => Thrift::Types::MAP, :name => 'dbl_map', :key => {:type => Thrift::Types::DOUBLE}, :value => {:type => Thrift::Types::STRUCT, :class => OneOfEach}},
5 => {:type => Thrift::Types::MAP, :name => 'str_map', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::STRUCT, :class => OneOfEach}}
}
+
+ def validate
+ end
end
# struct Nested2 {
@@ -182,6 +227,9 @@ module Fixtures
4 => {:type => Thrift::Types::MAP, :name => 'dbl_map', :key => {:type => Thrift::Types::DOUBLE}, :value => {:type => Thrift::Types::STRUCT, :class => Nested1}},
5 => {:type => Thrift::Types::MAP, :name => 'str_map', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::STRUCT, :class => Nested1}}
}
+
+ def validate
+ end
end
# struct Nested3 {
@@ -201,6 +249,9 @@ module Fixtures
4 => {:type => Thrift::Types::MAP, :name => 'dbl_map', :key => {:type => Thrift::Types::DOUBLE}, :value => {:type => Thrift::Types::STRUCT, :class => Nested2}},
5 => {:type => Thrift::Types::MAP, :name => 'str_map', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::STRUCT, :class => Nested2}}
}
+
+ def validate
+ end
end
# struct Nested4 {
@@ -220,6 +271,9 @@ module Fixtures
4 => {:type => Thrift::Types::MAP, :name => 'dbl_map', :key => {:type => Thrift::Types::DOUBLE}, :value => {:type => Thrift::Types::STRUCT, :class => Nested3}},
5 => {:type => Thrift::Types::MAP, :name => 'str_map', :key => {:type => Thrift::Types::STRING}, :value => {:type => Thrift::Types::STRUCT, :class => Nested3}}
}
+
+ def validate
+ end
end
end
end