summaryrefslogtreecommitdiffstats
path: root/tests
AgeCommit message (Collapse)AuthorFilesLines
2014-07-20Fix problem with .options file and extension fields.Petteri Aimonen5-1/+33
The options for an extension field were being looked up under wrong name (MessageName instead of MessageName.fieldname). Fixed the problem and added regression test. Created a new subfolder for regression test cases. Update issue 125 Status: FixedInGit
2014-06-02Add unit tests for allocate_field().Petteri Aimonen1-0/+23
2014-05-17Fix bug in alltypes test case that made fuzzing difficult.Petteri Aimonen5-0/+7
2014-04-15Fix typos in scons command line optionsPetteri Aimonen1-2/+2
2014-04-15Remove -O0 from tests CFLAGS so that optimized builds can be tested alsoPetteri Aimonen1-4/+4
2014-04-09Fix bug in missing_fields test casePetteri Aimonen1-2/+5
2014-04-09Use -fsanitize=undefined when running tests with clangPetteri Aimonen1-3/+13
2014-04-05Add rule for building coverage summary using lcov.Petteri Aimonen6-18/+49
Also modified a few tests to be more compatible with coverage information, so that they use the same pb_encode/decode.c instead of making a copy.
2014-04-05Add a convenience function pb_get_encoded_size()Petteri Aimonen1-0/+9
There is minimal size penalty from this, and it is probably much more intuitive to use than PB_OSTREAM_SIZING itself. This has been suggested before also, but I ended up refusing it back them. Reconsidering it now, I see that an intuitive API is much better than any amount of documentation explaining a non-intuitive API. Update issue 16 Status: FixedInGit
2014-04-05Add a 'found' field to pb_extension_t.Petteri Aimonen2-0/+3
Update issue 112 Status: FixedInGit
2014-04-02Fix splint warnings, add splint test casePetteri Aimonen2-0/+49
2014-04-01Fix compile error when default value given for extension field.Petteri Aimonen1-1/+1
Update issue 111 Status: FixedInGit
2014-03-18Add stdlib.h to pb_syshdr.h for dynamic allocationPetteri Aimonen1-0/+2
2014-03-16Documentation updatesPetteri Aimonen1-3/+0
2014-03-15Finish the alltypes_pointer testcase, use valgrind if available.Petteri Aimonen4-168/+90
2014-03-15Get rid of pb_bytes_ptr_t, just allocate pb_bytes_array_t dynamically.Petteri Aimonen3-8/+10
This makes the internal logic much simpler, and also keeps the datatypes more similar between STATIC/POINTER cases. It will still be a bit cumbersome to use because of variable length array member. Macros PB_BYTES_ARRAY_T(n) and PB_BYTES_ARRAY_T_ALLOCSIZE(n) have been added to make life a bit easier. This has the drawback that it is no longer as easy to use externally allocated byte array as input for bytes field in pointer mode. However, this is still easy to do using callbacks, so it shouldn't be a large issue.
2014-03-12Add pb_release() functionPetteri Aimonen3-20/+81
2014-03-10More fixes for dynamic allocationPetteri Aimonen2-25/+28
2014-02-24Beginnings of malloc support in pb_decodePetteri Aimonen2-1/+220
2014-02-12Add test case for package names defined in .proto file.Petteri Aimonen1-0/+36
2014-02-10Add AllTypes decoding test with callbacks.Petteri Aimonen2-1/+427
Update issue 99 Status: FixedInGit
2014-02-09Add AllTypes encoding test for callbacks (issue #99)Petteri Aimonen3-0/+420
Still need to do the decoding side.
2014-02-05Extreme negative integer constants are a bit nasty to define in C, just ↵Petteri Aimonen1-2/+2
avoid the trouble in tests for now.
2014-02-04Add proper suffixes for integer default values.Petteri Aimonen1-10/+10
Update issue 102 Status: FixedInGit
2014-02-04Add strict-aliasing GCC warnings for corePetteri Aimonen1-0/+1
2013-12-29Fix bundled protoc detection in scons scriptPetteri Aimonen1-3/+4
2013-12-29Fix spaces in paths on Windows alsoPetteri Aimonen1-1/+1
2013-12-29Fix handling spaces in directory namePetteri Aimonen1-2/+2
2013-12-29Fix build on WindowsPetteri Aimonen1-2/+4
2013-12-29Fix path change: compat/ -> extra/Petteri Aimonen1-1/+1
2013-12-29Small fix for previousPetteri Aimonen1-2/+2
2013-12-29Check for supported GCC CCFLAGS when building tests.Petteri Aimonen1-6/+20
2013-12-29Add a SCons tool for nanopb protos.Petteri Aimonen5-41/+129
This tool script is useful both for building the tests and also for use in other applications.
2013-12-29Bring alltypes_pointer testcase up to datePetteri Aimonen3-96/+24
2013-12-29Improve alltypes_pointer test casePetteri Aimonen3-95/+137
2013-12-29Organize allocation logic in generator, add pb_bytes_ptr_t.Petteri Aimonen1-15/+7
Allocation decision is now made before the field data type is decided. This way the data type decisions can more cleanly account for the allocation type, i.e. FT_DEFAULT logic etc. Added pb_bytes_ptr_t for pointer-allocated bytes-fields. There is no point generating separate structs for these, as they would all be of the same type.
2013-12-29Generating and encoding messages with dynamic allocaitonMartin Donath4-0/+249
2013-12-21Fix problem with decode_legacy test case on Windows.Petteri Aimonen1-3/+8
2013-12-21Add test for extreme integer values (INT32_MAX etc.) in AllTypes.Petteri Aimonen7-1/+92
2013-12-21Modify the alltypes test to check re-encoding through protoc.Petteri Aimonen3-15/+53
This way we can verify that the message is encoded exactly the same way as the official protobuf implementation would do it.
2013-11-13Make tests build in a separate folder, add to gitignorePetteri Aimonen16-44/+49
2013-11-02Generate #define tags for extension fields also.Petteri Aimonen1-0/+4
Update issue 93 Status: FixedInGit
2013-10-29Remove the NANOPB_INTERNALS functions from public API.Petteri Aimonen5-6/+8
These have been deprecated since nanopb-0.1.6 (some since 0.1.3). Equivalent functions with better interface are available in the API. Update issue 91 Status: FixedInGit
2013-10-24Detect invalid sizes when encoding bytes fields.Petteri Aimonen2-2/+20
2013-10-23Generate message size #defines also for messages defined in multiple files.Petteri Aimonen4-0/+55
Add testcase for the same.
2013-10-20Check array max size when encoding.Petteri Aimonen1-0/+14
Update issue 90 Status: FixedInGit
2013-09-26Add #defines for the maximum encoded message size.Petteri Aimonen4-3/+16
Update issue 89 Status: FixedInGit
2013-09-11Expand extra_fields test to cover field skipping in case of streams.Petteri Aimonen2-0/+4
2013-09-11Disable warning about uint64_t (long long)Petteri Aimonen1-1/+4
2013-09-11Fix build error when path contains spacesPetteri Aimonen1-3/+6