summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2012-08-24Implement error messages in the decoder side.Petteri Aimonen4-4/+4
Update issue 7 Status: Started
2012-08-24Reorganize the field decoder interface.Petteri Aimonen2-2/+4
This makes the field decoding functions more intuitive to use. The old interface is still present if you specify NANOPB_INTERNALS. Update issue 2 Status: FixedInGit
2012-07-31Extend 'alltypes' testcase to cover repeated fields.Petteri Aimonen3-24/+104
2012-07-18Fixed a few compiler warnings, added check.Petteri Aimonen1-2/+5
Main code is now compiled (for tests) with -pedantic -Wextra. The test programs are not as strictly bound, but this should improve the chances that atleast the core library compiles with most compilers without warnings.
2012-07-05Fix bug with .proto without messages (again), and add a test case for it.Petteri Aimonen2-1/+9
2012-06-30Improve the detection of missing required fields.Petteri Aimonen3-2/+192
Now the limit of tracked fields is configurable at compile-time using PB_MAX_REQUIRED_FIELDS. Added related test and updated documentation. Fixes issue #18.
2012-03-01Refactoring the field encoder interface.Petteri Aimonen2-5/+4
Replaced the confusing pb_enc_* functions with new pb_encode_* functions that have a cleaner interface. Updated documentation. Got rid of the endian_copy stuff in pb_encode.c, instead using C casts to do it automatically. This makes the code safer and also reduces binary size by about 5%. Fixes Issue 6.
2012-01-12Fixed issue 1 reported by Erik Rosen:Petteri Aimonen1-2/+10
The size of non-callback bytes-fields was miscalculated, which caused all following fields in a message to contain garbage. Previous commit contains a testcase for this. This fix changes the generated message description. If your protocol uses bytes-fields, you should regenerate *.pb.c.
2012-01-12Added an encode/decode test for 'required' fields of all types.Petteri Aimonen4-3/+168
2011-12-30Make the fuzztest runnable againPetteri Aimonen1-2/+2
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1091 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30Expanding the tests to better cover decoding from memory buffer.Petteri Aimonen4-26/+103
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1090 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-12-30Fixed a bug related to submessage encoding into memory buffer.Petteri Aimonen4-26/+66
Stream state was not copied back from substream in pb_enc_submessage, which caused garbage output if the stream callback modified the state. Expanded tests to cover this problem. Thanks to Paweł Pery for debugging and reporting this problem. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1089 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30Merged 0004-Added-missing-trailing-newlines.patch by Matt Kern.Petteri Aimonen1-1/+1
Just adding newlines at the end of files to satisfy old GCC versions. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1021 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-11-30Merged 0003-Fixed-format-specifiers.patch by Matt Kern.Petteri Aimonen2-8/+8
Fixes cross-platform issues with the length modifier in printf specifiers, most importantly %d -> %ld. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@1020 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-18Added comments to the simplest decode/encode examples.Petteri Aimonen2-6/+25
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@979 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-13Fixed a bunch of bugs related to callback fields.Petteri Aimonen6-40/+117
Most importantly, callback fields in submessages were being overwritten with garbage, causing segfaults. Additionally, converted PB_LTYPE_FIXED to PB_LTYPE_FIXED32 and PB_LTYPE_FIXED64. This makes the interface a bit easier to use, and in addition runs faster. git-svn-id: https://svn.kapsi.fi/jpa/nanopb@975 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-09-12Tests for callback fieldsPetteri Aimonen6-2/+108
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@974 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24Make fuzz test runnable again :)Petteri Aimonen1-1/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@971 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24makefile fixPetteri Aimonen1-1/+2
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@968 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-24wrong file namePetteri Aimonen3-3/+3
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@967 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23More unittestsPetteri Aimonen2-0/+116
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@966 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23Changed autogenerated file naming from foo.c to foo.pb.cPetteri Aimonen3-27/+36
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23more unittestsPetteri Aimonen1-0/+12
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@964 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23More unittestsPetteri Aimonen3-7/+178
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@960 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-22unittests, change to PB_LTYPE_BYTES data sizePetteri Aimonen2-12/+69
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-17ExamplePetteri Aimonen4-16/+36
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@957 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-16DocsPetteri Aimonen1-1/+1
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@956 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-14More documentation, small improvementsPetteri Aimonen2-21/+12
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-11Documenting and improving stream behaviourPetteri Aimonen2-7/+24
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@954 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-10Unittests for encodePetteri Aimonen4-16/+156
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@952 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-04EncoderPetteri Aimonen4-7/+31
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-31First version of header generatorPetteri Aimonen4-75/+36
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-30unittests (some)Petteri Aimonen3-19/+134
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-28iterPetteri Aimonen1-7/+7
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@948 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-28git-svn-id: https://svn.kapsi.fi/jpa/nanopb@947 ↵Petteri Aimonen1-2/+2
e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27bugfixPetteri Aimonen1-1/+1
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@946 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27git-svn-id: https://svn.kapsi.fi/jpa/nanopb@945 ↵Petteri Aimonen2-16/+2
e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Making code ansi-compatiblePetteri Aimonen2-1/+12
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@944 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Improvements, array supportPetteri Aimonen1-31/+48
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@943 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-25First version of decodingPetteri Aimonen3-0/+123
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@942 e3a754e5-d11d-0410-8d38-ebb782a927b9