diff options
author | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-07-27 20:01:50 +0000 |
---|---|---|
committer | Petteri Aimonen <jpa@npb.mail.kapsi.fi> | 2011-07-27 20:01:50 +0000 |
commit | 42e5fcc0bee38d183e1d00b4cecb1a5c831ed601 (patch) | |
tree | 820a95571d653278b33a0352d7df18a5954f21c7 /tests | |
parent | ead3b734d8f96837ea6564b694df5618134e3cf8 (diff) |
git-svn-id: https://svn.kapsi.fi/jpa/nanopb@945 e3a754e5-d11d-0410-8d38-ebb782a927b9
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Makefile | 2 | ||||
-rw-r--r-- | tests/test_decode1.c | 16 |
2 files changed, 2 insertions, 16 deletions
diff --git a/tests/Makefile b/tests/Makefile index da4030e2..3053fa4a 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -9,3 +9,5 @@ clean: test_decode1: test_decode1.c $(DEPS) $(CC) $(CFLAGS) -o $@ $< ../pb_decode.c +fuzztest: test_decode1 + I=1; while cat /dev/urandom | ./test_decode1 > /dev/null; do I=$(($I+1)); echo -en "\r$I"; done
\ No newline at end of file diff --git a/tests/test_decode1.c b/tests/test_decode1.c index 20ea65e4..8623fbdb 100644 --- a/tests/test_decode1.c +++ b/tests/test_decode1.c @@ -90,22 +90,6 @@ bool print_person(pb_istream_t *stream) return true; } -bool my_read(pb_istream_t *stream, char *buf, size_t count) -{ - char *source = (char*)stream->state; - - if (!stream->bytes_left) - return false; - - if (buf != NULL) - { - memcpy(buf, source, count); - } - - stream->state = source + count; - return true; -} - int main() { uint8_t buffer[512]; |