aboutsummaryrefslogtreecommitdiffstats
path: root/tests/Makefile
AgeCommit message (Collapse)AuthorFilesLines
2014-09-07Code coverage results were ignoring the data from encode/decode unittests.Petteri Aimonen1-3/+3
Update issue 126 Status: Started
2014-04-05Add rule for building coverage summary using lcov.Petteri Aimonen1-0/+15
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.
2013-09-08Start moving the tests into subfolders. Transition to SCons for build system ↵Petteri Aimonen1-140/+3
for the tests. Only a few tests updated so far. Have to include all the rest before merging to mainline. Update issue 63 Status: Started
2013-07-17Add test case for extensions decodingPetteri Aimonen1-1/+3
2013-07-17Implement generator support for extension fields (no encoder/decoder support ↵Petteri Aimonen1-2/+3
yet)
2013-07-16Add test case for extra fields in AllTypesPetteri Aimonen1-0/+1
2013-03-09Add option to run the tests with mudflap to detect pointer errors.Petteri Aimonen1-0/+8
2013-03-09Improve the fuzztest.Petteri Aimonen1-4/+4
Enable -fstack-protector-all to detect any stack smashing bugs. Also use test_decode3 for maximal vulnerable surface.
2013-02-07Sanitize filenames before putting them in #ifndef.Petteri Aimonen1-1/+2
Update issue 50 Status: FixedInGit
2013-02-06Add compile-time option PB_BUFFER_ONLY.Petteri Aimonen1-2/+18
This allows slight optimizations if only memory buffer support (as opposed to stream callbacks) is wanted. On ARM difference is -12% execution time, -4% code size when enabled.
2013-01-13Add a test for the backwards compatibility of generated files.Petteri Aimonen1-1/+5
It is not necessary to maintain full compatibility of generated files for all of eternity, but this test will warn us if there is a need to regenerate the files.
2012-11-16Use TESTS variable to define dependencies for run_unittestsSteffen Siering1-6/+11
2012-11-16Select compilation options based on $(CC) in tests/Makefile.Petteri Aimonen1-3/+11
Makes 'make CC=clang' work. Based on patch submitted by Steffen Siering. Update issue 40: Status: FixedInGit
2012-11-16Rename test_compiles.c to test_multiple_files.cPetteri Aimonen1-3/+3
2012-11-16Fix STATIC_ASSERT macro when using multiple .proto files.Steffen Siering1-2/+5
The __COUNTER__ macro (used for generating unique names) is at least supported by gcc, clang and Visual Studio. With this change test_compiles.c is compilable, since no more typedefs are redefined. Compilers/Preprocessors not supporting __COUNTER__ error's are still possible which are hopfully handled by the usage of __LINE__ in most sittuations. Added unit test for the problem.
2012-11-14Fix naming of enums when long_names=false.Petteri Aimonen1-1/+1
Modify test case to check that options.pb.o compiles. Update issue 42 Status: FixedInGit Update issue 43 Status: FixedInGit
2012-10-29Add option to use short names for enum values.Petteri Aimonen1-3/+3
Update issue 38 Status: FixedInGit
2012-10-29Improve .proto options parsing.Petteri Aimonen1-1/+9
Options can now be defined on command line, file, message or in field scope. Update issue 12 Status: Started
2012-10-21Improve the person_with_extra_field test.Petteri Aimonen1-1/+1
Added a field after the extra field to verify it's also ok.
2012-10-18Remove the "buf = NULL" => skip requirement from pb_istream_t callbacks.Petteri Aimonen1-0/+3
Rationale: it's easy to implement the callback wrong. Doing so introduces io errors when unknown fields are present in the input. If code is not tested with unknown fields, these bugs can remain hidden for long time. Added a special case for the memory buffer stream, where it gives a small speed benefit. Added testcase for skipping fields with test_decode2 implementation. Update issue 37 Status: FixedInGit
2012-09-03Enable -Wconversion for core and fix the warnings.Petteri Aimonen1-1/+1
This should help avoid issue 33 in the future.
2012-09-02Fix -Wextra warning in generated .pb.c files.Petteri Aimonen1-0/+3
Compile the generated files with the same extra-strict settings as the core, in order to detect problems in tests. Update issue 32 Status: FixedInGit
2012-08-26Fix warnings with -Wcast-qual. Add test for C++ compile.Petteri Aimonen1-2/+8
Update issue 27 Status: FixedInGit
2012-08-26Added alltypes-testcases for optional fields and default values.Petteri Aimonen1-1/+2
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 Aimonen1-1/+2
2012-06-30Improve the detection of missing required fields.Petteri Aimonen1-2/+5
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-01-12Added an encode/decode test for 'required' fields of all types.Petteri Aimonen1-3/+8
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 Aimonen1-1/+5
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 Aimonen1-1/+5
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-09-13Fixed a bunch of bugs related to callback fields.Petteri Aimonen1-2/+2
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 Aimonen1-2/+7
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@974 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-23Changed autogenerated file naming from foo.c to foo.pb.cPetteri Aimonen1-9/+11
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@965 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-23More unittestsPetteri Aimonen1-7/+14
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 Aimonen1-6/+16
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@959 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-17ExamplePetteri Aimonen1-6/+12
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 Aimonen1-0/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@955 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-10Unittests for encodePetteri Aimonen1-4/+5
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@952 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-08-04EncoderPetteri Aimonen1-4/+4
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@951 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-31First version of header generatorPetteri Aimonen1-1/+1
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@950 e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-30unittests (some)Petteri Aimonen1-4/+8
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@949 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 Aimonen1-0/+2
e3a754e5-d11d-0410-8d38-ebb782a927b9
2011-07-27Making code ansi-compatiblePetteri Aimonen1-0/+11
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@944 e3a754e5-d11d-0410-8d38-ebb782a927b9