DescriptionNew Mojom Parser: Serialization.
R=azani@chromium.org, mattr@google.com
BUG=#461
This is the final major piece of the mojom parser--the logic to serialize the MojomDescriptor to a Mojo message.
Note that currently the use of Mojo serialization requires using cgo and linking against native librarires.
This also means that serialization_test.go cannot be run as a pure go test the way the other tests are run but
rather must be run using the "go_test_binary" target. This target will build a test binary in
<out_dir>/obj/mojom/mojom_parser/serialization_test which needs to be executed separately.
Here is a summary of the files changed:
- mojo/go/rules.gni: I updated the "go_test_binary" target to be closer to the "go_binary" target
- get_test_list.py: I added a new category of test for serialization_test since on the one hand it cannot
be run as part of the Pure Go unit tests and on the other hand it would be confusing and misleading to
run it under the heading Go system tests.
- mojom/mojom_parser/generated: This directory contains generated Go code that we are checking in. It is the
Go bindings for mojom_types.mojom and mojom_files.mojom.
- serialization.go: This is the actual serialization logic.
- serialization_test.go: A test of the serialization logic.
Committed: https://chromium.googlesource.com/external/mojo/+/3708f59648870ffd4ab7f062e75f9d7ac7375449
Patch Set 1 #Patch Set 2 : Rebasing #Patch Set 3 : Working on serialization_test.go (This file not ready for review.) #Patch Set 4 : Introduce function newString(). More serialization_test work. #Patch Set 5 : New strategy for testing structure identity: Use modified fmt package. #Patch Set 6 : Use revered fqn for type keys. Make line numbers optional. #
Total comments: 2
Patch Set 7 : "mojom parser serialization tests" => "mojom parser tests" #Patch Set 8 : Adds README to the |generated| directory. #Patch Set 9 : Fix typos. #
Total comments: 11
Patch Set 10 : Responding to code reveiw. #Patch Set 11 : Refactors TestSingleFileSerialization. #
Messages
Total messages: 22 (9 generated)
|