]> mj.ucw.cz Git - libucw.git/commitdiff
CRC: Added tests
authorMartin Mares <mj@ucw.cz>
Sun, 18 Mar 2012 21:39:37 +0000 (22:39 +0100)
committerMartin Mares <mj@ucw.cz>
Sun, 18 Mar 2012 21:39:37 +0000 (22:39 +0100)
ucw/Makefile
ucw/crc.t [new file with mode: 0644]

index 86c961d95fc29ae27117eb360385d0cd19f492a7..aa795e76202c9101c6c0d48b738648a9a5bcb598 100644 (file)
@@ -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 (file)
index 0000000..9b2bb8c
--- /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