Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(159)

Unified Diff: third_party/protobuf/ruby/tests/stress.rb

Issue 1322483002: Revert https://codereview.chromium.org/1291903002 (protobuf roll). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/protobuf/ruby/tests/repeated_field_test.rb ('k') | third_party/protobuf/ruby/travis-test.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/protobuf/ruby/tests/stress.rb
diff --git a/third_party/protobuf/ruby/tests/stress.rb b/third_party/protobuf/ruby/tests/stress.rb
deleted file mode 100644
index 082d5e22df089ab903f326643b08bf5f80e595d7..0000000000000000000000000000000000000000
--- a/third_party/protobuf/ruby/tests/stress.rb
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/usr/bin/ruby
-
-require 'google/protobuf'
-require 'test/unit'
-
-module StressTest
- pool = Google::Protobuf::DescriptorPool.new
- pool.build do
- add_message "TestMessage" do
- optional :a, :int32, 1
- repeated :b, :message, 2, "M"
- end
- add_message "M" do
- optional :foo, :string, 1
- end
- end
-
- TestMessage = pool.lookup("TestMessage").msgclass
- M = pool.lookup("M").msgclass
-
- class StressTest < Test::Unit::TestCase
- def get_msg
- TestMessage.new(:a => 1000,
- :b => [M.new(:foo => "hello"),
- M.new(:foo => "world")])
- end
- def test_stress
- m = get_msg
- data = TestMessage.encode(m)
- 100_000.times do
- mnew = TestMessage.decode(data)
- mnew = mnew.dup
- assert_equal mnew.inspect, m.inspect
- assert TestMessage.encode(mnew) == data
- end
- end
- end
-end
« no previous file with comments | « third_party/protobuf/ruby/tests/repeated_field_test.rb ('k') | third_party/protobuf/ruby/travis-test.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698