On 02/27/2013 05:57 PM, mdroth wrote:
On Tue, Feb 26, 2013 at 05:03:56PM -0600, jsch...@linux.vnet.ibm.com wrote:
These patches implement asn1 ber visitors for encoding and decoding data.
References: <20130226230354.982917...@linux.vnet.ibm.com>
Content-Disposition: inline; filename=asn1_all.diff

Signed-off-by: Stefan Berger <stef...@linux.vnet.ibm.com>
Signed-off-by: Joel Schopp <jsch...@linux.vnet.ibm.com>
---
  Makefile.objs               |   10
  ber/Makefile.objs           |    2
  ber/ber-common.c            |   56 ++
  ber/ber-input-visitor.c     |  969 
++++++++++++++++++++++++++++++++++++++++++++
  ber/ber-input-visitor.h     |   30 +
  ber/ber-output-visitor.c    |  563 +++++++++++++++++++++++++
  ber/ber-output-visitor.h    |   28 +
Please break the input/output implementations out into separate patches,
and follow those up with test cases. See:

tests/test-{string,qmp}-{input,output}-visitor.c
tests/test-visitor-serialization.c

I saw this with the other test cases... The problem with the ASN.1 encoding is that writing ASN.1 into a buffer doesn't make much sense, unless of course you were to compare it against a binary string that was generated through other means, which I didn't do. So instead I wrote test cases that write the ASN.1 stream using the output visitor and then immediately feed the streams into the input visitor and then I compare the outcome against expected outcome, e.g., that a stucture's fields were properly filled. I hope this makes more sense in the ASN.1 case.

   Stefan



Reply via email to