Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
1e58006b
Commit
1e58006b
authored
Oct 12, 2017
by
@rubynerd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test for field reassignment
parent
f3e86fd2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
repeated_field_test.rb
ruby/tests/repeated_field_test.rb
+6
-0
No files found.
ruby/tests/repeated_field_test.rb
View file @
1e58006b
...
...
@@ -126,6 +126,12 @@ class RepeatedFieldTest < Test::Unit::TestCase
assert_equal
false
,
m
.
repeated_string
.
empty?
end
def
test_reassign
m
=
TestMessage
.
new
m
.
repeated_msg
=
Google
::
Protobuf
::
RepeatedField
.
new
(
:message
,
TestMessage2
,
[
TestMessage2
.
new
(
:foo
=>
1
)])
assert_equal
m
.
repeated_msg
.
first
,
TestMessage2
.
new
(
:foo
=>
1
)
end
def
test_array_accessor
m
=
TestMessage
.
new
reference_arr
=
%w(foo bar baz)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment