test/plugin/test_out_datadog_log.rb
# For an optional field with default values, Protobuf omits the field when it
# is deserialized to json. So we need to add an extra check for gRPC which
# uses Protobuf.
#
# An optional block can be passed in if we need to assert something other than
# a plain equal. e.g. assert_in_delta.
For an optional field with default values, Protobuf omits the field when it
is deserialized to json. So we need to add an extra check for gRPC which
uses Protobuf.

An optional block can be passed in if we need to assert something other than
a plain equal.
For an optional field with default values Protobuf omits the field when it is deserialized to json . So we need to add an extra check for gRPC which uses Protobuf . An optional block can be passed in if we need to assert something other than a plain equal .
def assert_equal_with_default(field, expected_value, default_value, entry)
    if expected_value == default_value
      assert_nil field
    elsif block_given?
      yield
    else
      assert_equal expected_value, field, entry
    end
  end
def assert_equal_with_default ( field , expected_value , default_value , entry ) if expected_value == default_value assert_nil field elsif block_given? yield else assert_equal expected_value , field , entry end end
For an optional field with default values, Protobuf omits the field when it
is deserialized to json.
For an optional field with default values Protobuf omits the field when it is deserialized to json .
field
<not_specific>
expected_value
<not_specific>
default_value
<not_specific>
entry
<not_specific>