proto2.js
No description.

File Location

/goog/testing/proto2/proto2.js


Public Protected Private

Global Functions

goog.testing.proto2.assertEquals(expectedactualopt_failureMessage)
Compares two goog.proto2.Message objects. Gives more readable output than assertObjectEquals on mismatch.
Arguments:
expected : !goog.proto2.Message
Expected proto2 message.
actual : !goog.proto2.Message
Actual proto2 message.
opt_failureMessage : string=
Failure message when the values don't match.
code »
goog.testing.proto2.findDifferences_(expectedactualpath) string
Compares two goog.proto2.Message instances of the same type.
Arguments:
expected : !goog.proto2.Message
First message.
actual : !goog.proto2.Message
Second message.
path : string
Path to the messages.
Returns: string  A string describing where they differ. Empty string if they are equal.
code »
goog.testing.proto2.fromObject(messageCtorjson) !MessageType
Helper function to quickly build protocol buffer messages from JSON objects.
Arguments:
messageCtor : function(new:MessageType)
A constructor that creates a goog.proto2.Message subclass instance.
json : !Object
JSON object which uses field names as keys.
Returns: !MessageType  The deserialized protocol buffer.
code »

Directory proto2

File Reference