From a44db5988b30f0a3aae435b7c7237dabcf13a9a5 Mon Sep 17 00:00:00 2001 From: Martin Mares Date: Sun, 18 Mar 2012 22:39:37 +0100 Subject: [PATCH] CRC: Added tests --- ucw/Makefile | 3 ++- ucw/crc.t | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 ucw/crc.t diff --git a/ucw/Makefile b/ucw/Makefile index 86c961d9..aa795e76 100644 --- a/ucw/Makefile +++ b/ucw/Makefile @@ -113,7 +113,7 @@ TESTS+=$(addprefix $(o)/ucw/,regex.test unicode.test hash-test.test mempool.test fb-socket.test trie-test.test string.test sha1.test asort-test.test binheap-test.test \ redblack-test.test fb-file.test fb-grow.test fb-pool.test fb-atomic.test \ fb-limfd.test fb-temp.test fb-mem.test fb-buffer.test fb-mmap.test url.test strtonum-test.test \ - gary.test time.test) + gary.test time.test crc.test) $(o)/ucw/regex.test: $(o)/ucw/regex-t $(o)/ucw/unicode.test: $(o)/ucw/unicode-t @@ -139,6 +139,7 @@ $(addprefix $(o)/ucw/fb-,file.test grow.test pool.test socket.test atomic.test \ $(o)/ucw/url.test: $(o)/ucw/url-t $(o)/ucw/gary.test: $(o)/ucw/gary-t $(o)/ucw/time.test: $(o)/ucw/time-conf-t +$(o)/ucw/crc.test: $(o)/ucw/crc-t ifdef CONFIG_UCW_THREADS TESTS+=$(addprefix $(o)/ucw/,asio.test) diff --git a/ucw/crc.t b/ucw/crc.t new file mode 100644 index 00000000..9b2bb8c8 --- /dev/null +++ b/ucw/crc.t @@ -0,0 +1,25 @@ +# Tests for crc + +Name: Default/small +Run: ../obj/ucw/crc-t 0 123456 37 3 +Out: d620f179 + +Name: Default/big +Run: ../obj/ucw/crc-t 0 123456 10037 3 +Out: d620f179 + +Name: Small/small +Run: ../obj/ucw/crc-t 1 123456 37 3 +Out: d620f179 + +Name: Small/big +Run: ../obj/ucw/crc-t 1 123456 10037 3 +Out: d620f179 + +Name: Large/small +Run: ../obj/ucw/crc-t 2 123456 37 3 +Out: d620f179 + +Name: Large/big +Run: ../obj/ucw/crc-t 2 123456 10037 3 +Out: d620f179 -- 2.39.2