google-protobuf 3.21.12-x86_64-darwin → 3.22.0.rc.3-x86_64-darwin
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 +4 -4
- data/ext/google/protobuf_c/convert.c +0 -0
- data/ext/google/protobuf_c/convert.h +0 -0
- data/ext/google/protobuf_c/defs.c +3 -3
- data/ext/google/protobuf_c/defs.h +0 -0
- data/ext/google/protobuf_c/extconf.rb +2 -3
- data/ext/google/protobuf_c/map.c +27 -42
- data/ext/google/protobuf_c/map.h +0 -0
- data/ext/google/protobuf_c/message.c +116 -99
- data/ext/google/protobuf_c/message.h +0 -0
- data/ext/google/protobuf_c/protobuf.c +0 -0
- data/ext/google/protobuf_c/protobuf.h +0 -0
- data/ext/google/protobuf_c/repeated_field.c +0 -0
- data/ext/google/protobuf_c/repeated_field.h +0 -0
- data/ext/google/protobuf_c/ruby-upb.c +10546 -9149
- data/ext/google/protobuf_c/ruby-upb.h +7608 -3276
- data/ext/google/protobuf_c/third_party/utf8_range/LICENSE +1 -0
- data/ext/google/protobuf_c/third_party/utf8_range/naive.c +0 -0
- data/ext/google/protobuf_c/third_party/utf8_range/range2-neon.c +1 -1
- data/ext/google/protobuf_c/third_party/utf8_range/range2-sse.c +0 -0
- data/ext/google/protobuf_c/third_party/utf8_range/utf8_range.h +13 -1
- data/ext/google/protobuf_c/wrap_memcpy.c +0 -0
- data/lib/google/2.6/protobuf_c.bundle +0 -0
- data/lib/google/2.7/protobuf_c.bundle +0 -0
- data/lib/google/3.0/protobuf_c.bundle +0 -0
- data/lib/google/3.1/protobuf_c.bundle +0 -0
- data/lib/google/3.2/protobuf_c.bundle +0 -0
- data/lib/google/protobuf/any_pb.rb +0 -0
- data/lib/google/protobuf/api_pb.rb +0 -0
- data/lib/google/protobuf/descriptor_dsl.rb +0 -0
- data/lib/google/protobuf/descriptor_pb.rb +41 -12
- data/lib/google/protobuf/duration_pb.rb +0 -0
- data/lib/google/protobuf/empty_pb.rb +0 -0
- data/lib/google/protobuf/field_mask_pb.rb +0 -0
- data/lib/google/protobuf/message_exts.rb +5 -0
- data/lib/google/protobuf/plugin_pb.rb +50 -0
- data/lib/google/protobuf/repeated_field.rb +0 -0
- data/lib/google/protobuf/source_context_pb.rb +0 -0
- data/lib/google/protobuf/struct_pb.rb +0 -0
- data/lib/google/protobuf/timestamp_pb.rb +0 -0
- data/lib/google/protobuf/type_pb.rb +0 -0
- data/lib/google/protobuf/wrappers_pb.rb +0 -0
- data/lib/google/protobuf.rb +0 -0
- metadata +11 -16
- data/lib/google/2.5/protobuf_c.bundle +0 -0
- data/tests/basic.rb +0 -739
- data/tests/generated_code_test.rb +0 -23
- data/tests/stress.rb +0 -38
@@ -1,23 +0,0 @@
|
|
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_pb'
|
7
|
-
require 'test_import_pb'
|
8
|
-
require 'test_ruby_package_pb'
|
9
|
-
require 'test/unit'
|
10
|
-
|
11
|
-
class GeneratedCodeTest < Test::Unit::TestCase
|
12
|
-
def test_generated_msg
|
13
|
-
# just test that we can instantiate the message. The purpose of this test
|
14
|
-
# is to ensure that the output of the code generator is valid Ruby and
|
15
|
-
# successfully creates message definitions and classes, not to test every
|
16
|
-
# aspect of the extension (basic.rb is for that).
|
17
|
-
A::B::C::TestMessage.new
|
18
|
-
A::B::C::TestMessage::NestedMessage.new
|
19
|
-
A::B::C::TestLowercaseNested::Lowercase.new
|
20
|
-
FooBar::TestImportedMessage.new
|
21
|
-
A::B::TestRubyPackageMessage.new
|
22
|
-
end
|
23
|
-
end
|
data/tests/stress.rb
DELETED
@@ -1,38 +0,0 @@
|
|
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 m.inspect, mnew.inspect
|
34
|
-
assert TestMessage.encode(mnew) == data
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
end
|