google-protobuf 3.0.0.alpha.5.0.3-x64-mingw32
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of google-protobuf might be problematic. Click here for more details.
- checksums.yaml +7 -0
- data/ext/google/protobuf_c/defs.c +1753 -0
- data/ext/google/protobuf_c/encode_decode.c +1200 -0
- data/ext/google/protobuf_c/extconf.rb +10 -0
- data/ext/google/protobuf_c/map.c +808 -0
- data/ext/google/protobuf_c/message.c +580 -0
- data/ext/google/protobuf_c/protobuf.c +115 -0
- data/ext/google/protobuf_c/protobuf.h +536 -0
- data/ext/google/protobuf_c/repeated_field.c +651 -0
- data/ext/google/protobuf_c/storage.c +863 -0
- data/ext/google/protobuf_c/upb.c +11990 -0
- data/ext/google/protobuf_c/upb.h +8217 -0
- data/lib/google/2.0/protobuf_c.so +0 -0
- data/lib/google/2.1/protobuf_c.so +0 -0
- data/lib/google/2.2/protobuf_c.so +0 -0
- data/lib/google/2.3/protobuf_c.so +0 -0
- data/lib/google/protobuf.rb +76 -0
- data/lib/google/protobuf/message_exts.rb +53 -0
- data/lib/google/protobuf/repeated_field.rb +188 -0
- data/tests/basic.rb +1140 -0
- data/tests/generated_code_test.rb +17 -0
- data/tests/stress.rb +38 -0
- metadata +123 -0
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
# generated_code.rb is in the same directory as this test.
|
4
|
+
$LOAD_PATH.unshift(File.expand_path(File.dirname(__FILE__)))
|
5
|
+
|
6
|
+
require 'generated_code'
|
7
|
+
require 'test/unit'
|
8
|
+
|
9
|
+
class GeneratedCodeTest < Test::Unit::TestCase
|
10
|
+
def test_generated_msg
|
11
|
+
# just test that we can instantiate the message. The purpose of this test
|
12
|
+
# is to ensure that the output of the code generator is valid Ruby and
|
13
|
+
# successfully creates message definitions and classes, not to test every
|
14
|
+
# aspect of the extension (basic.rb is for that).
|
15
|
+
m = A::B::C::TestMessage.new()
|
16
|
+
end
|
17
|
+
end
|
data/tests/stress.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/ruby
|
2
|
+
|
3
|
+
require 'google/protobuf'
|
4
|
+
require 'test/unit'
|
5
|
+
|
6
|
+
module StressTest
|
7
|
+
pool = Google::Protobuf::DescriptorPool.new
|
8
|
+
pool.build do
|
9
|
+
add_message "TestMessage" do
|
10
|
+
optional :a, :int32, 1
|
11
|
+
repeated :b, :message, 2, "M"
|
12
|
+
end
|
13
|
+
add_message "M" do
|
14
|
+
optional :foo, :string, 1
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
TestMessage = pool.lookup("TestMessage").msgclass
|
19
|
+
M = pool.lookup("M").msgclass
|
20
|
+
|
21
|
+
class StressTest < Test::Unit::TestCase
|
22
|
+
def get_msg
|
23
|
+
TestMessage.new(:a => 1000,
|
24
|
+
:b => [M.new(:foo => "hello"),
|
25
|
+
M.new(:foo => "world")])
|
26
|
+
end
|
27
|
+
def test_stress
|
28
|
+
m = get_msg
|
29
|
+
data = TestMessage.encode(m)
|
30
|
+
100_000.times do
|
31
|
+
mnew = TestMessage.decode(data)
|
32
|
+
mnew = mnew.dup
|
33
|
+
assert_equal mnew.inspect, m.inspect
|
34
|
+
assert TestMessage.encode(mnew) == data
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
metadata
ADDED
@@ -0,0 +1,123 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: google-protobuf
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 3.0.0.alpha.5.0.3
|
5
|
+
platform: x64-mingw32
|
6
|
+
authors:
|
7
|
+
- Protobuf Authors
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-02-11 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake-compiler-dock
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake-compiler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: test-unit
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubygems-tasks
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Protocol Buffers are Google's data interchange format.
|
70
|
+
email: protobuf@googlegroups.com
|
71
|
+
executables: []
|
72
|
+
extensions: []
|
73
|
+
extra_rdoc_files: []
|
74
|
+
files:
|
75
|
+
- ext/google/protobuf_c/defs.c
|
76
|
+
- ext/google/protobuf_c/encode_decode.c
|
77
|
+
- ext/google/protobuf_c/extconf.rb
|
78
|
+
- ext/google/protobuf_c/map.c
|
79
|
+
- ext/google/protobuf_c/message.c
|
80
|
+
- ext/google/protobuf_c/protobuf.c
|
81
|
+
- ext/google/protobuf_c/protobuf.h
|
82
|
+
- ext/google/protobuf_c/repeated_field.c
|
83
|
+
- ext/google/protobuf_c/storage.c
|
84
|
+
- ext/google/protobuf_c/upb.c
|
85
|
+
- ext/google/protobuf_c/upb.h
|
86
|
+
- lib/google/2.0/protobuf_c.so
|
87
|
+
- lib/google/2.1/protobuf_c.so
|
88
|
+
- lib/google/2.2/protobuf_c.so
|
89
|
+
- lib/google/2.3/protobuf_c.so
|
90
|
+
- lib/google/protobuf.rb
|
91
|
+
- lib/google/protobuf/message_exts.rb
|
92
|
+
- lib/google/protobuf/repeated_field.rb
|
93
|
+
- tests/basic.rb
|
94
|
+
- tests/generated_code_test.rb
|
95
|
+
- tests/stress.rb
|
96
|
+
homepage: https://developers.google.com/protocol-buffers
|
97
|
+
licenses:
|
98
|
+
- BSD
|
99
|
+
metadata: {}
|
100
|
+
post_install_message:
|
101
|
+
rdoc_options: []
|
102
|
+
require_paths:
|
103
|
+
- lib
|
104
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
version: '0'
|
109
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
110
|
+
requirements:
|
111
|
+
- - ">"
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
version: 1.3.1
|
114
|
+
requirements: []
|
115
|
+
rubyforge_project:
|
116
|
+
rubygems_version: 2.5.1
|
117
|
+
signing_key:
|
118
|
+
specification_version: 4
|
119
|
+
summary: Protocol Buffers
|
120
|
+
test_files:
|
121
|
+
- tests/basic.rb
|
122
|
+
- tests/stress.rb
|
123
|
+
- tests/generated_code_test.rb
|