Commit Graph

397 Commits

Author SHA1 Message Date
Pieter Noordhuis
7e773ee238 Use macro for test definition
This makes sure that tests are declared static, so the compiler
complains when they are not used. Declaring static is easy to forget,
and we want to make sure all tests are run!
2012-01-04 10:31:39 -08:00
Pieter Noordhuis
47f23f0a16 Factor out code run after successful connection 2012-01-04 09:29:40 -08:00
Pieter Noordhuis
07db464b53 Factor protocol formatting code to separate file 2011-10-10 14:11:08 +02:00
Pieter Noordhuis
10da4544a6 Buffered read/write for handle 2011-10-01 11:35:28 +02:00
Pieter Noordhuis
c06801cba9 Test successful connection 2011-10-01 01:14:15 +02:00
Pieter Noordhuis
aacf12c2de Bootstrap redis_handle 2011-10-01 01:03:47 +02:00
Pieter Noordhuis
6ccf65d5c4 Fix compiler warnings 2011-09-30 18:41:36 +02:00
Pieter Noordhuis
74d000ae26 Implement redis_object destroy callback 2011-09-30 18:41:17 +02:00
Pieter Noordhuis
5bd66cae90 Fix warnings in parser tests 2011-09-30 18:24:50 +02:00
Pieter Noordhuis
87d9d48b1b Ignore compiler warning on unused labels 2011-09-30 18:24:27 +02:00
Pieter Noordhuis
54a39608e0 Destroy hook for parser 2011-09-30 18:18:07 +02:00
Pieter Noordhuis
7540faf39d Extra object tests 2011-09-30 17:47:10 +02:00
Pieter Noordhuis
306c97dcd4 Fix build for new tests 2011-09-30 16:16:19 +02:00
Pieter Noordhuis
1375e4008c Extract object code to separate file (+refactor) 2011-09-30 15:37:24 +02:00
Pieter Noordhuis
70fe4177ab Increment array cursor after completing nested object 2011-09-30 15:26:38 +02:00
Pieter Noordhuis
dfc0c796e3 String equality helper 2011-09-30 15:19:13 +02:00
Pieter Noordhuis
77a045ff4d Destroy callback prototype 2011-09-30 15:19:04 +02:00
Pieter Noordhuis
bb2d09113c Move custom asserts to test helper 2011-09-30 14:28:34 +02:00
Pieter Noordhuis
c288dd29b9 Change callback type prefix 2011-09-30 14:25:34 +02:00
Pieter Noordhuis
679b231774 Add destroy callback to parser 2011-09-30 14:25:34 +02:00
Pieter Noordhuis
71f280f065 Whitespace 2011-09-30 14:25:34 +02:00
Pieter Noordhuis
7d260dd77b Drop the _t suffix 2011-09-30 14:25:29 +02:00
Pieter Noordhuis
a866667fd4 Add total bulk/multi bulk size to protocol_t 2011-09-29 12:53:04 +02:00
Pieter Noordhuis
b852caf345 Abbreviate errors http-parser.c style 2011-09-29 11:52:36 +02:00
Pieter Noordhuis
e791703fdd Makefile target for parser tests 2011-09-29 11:51:52 +02:00
Pieter Noordhuis
62a36ab1f9 Fix up includes for parser tests 2011-09-29 11:49:35 +02:00
Pieter Noordhuis
c6bbe8403f Rename file with parser tests 2011-09-29 11:33:24 +02:00
Pieter Noordhuis
a69942ccd7 Style 2011-09-29 11:33:15 +02:00
Pieter Noordhuis
4d3f9aa1b7 Change include protection 2011-07-20 11:48:00 +02:00
Pieter Noordhuis
fdc802349f Fix type for nil objects 2011-07-15 11:42:17 +02:00
Pieter Noordhuis
4234b1cf2c Function to pull root object from parser 2011-07-14 20:18:51 +02:00
Pieter Noordhuis
29617b1a65 Rename occurances of errno (conflict with errno.h) 2011-07-14 17:02:26 +02:00
Pieter Noordhuis
82555dfaad Abort if the parser is in an error state 2011-07-14 14:41:28 +02:00
Pieter Noordhuis
32d86ef979 Align escapes 2011-07-14 14:22:10 +02:00
Pieter Noordhuis
d9c056721f Use custom asserts to have immediate introspection 2011-07-12 17:13:34 +02:00
Pieter Noordhuis
b550b8c800 More tests for status and error messages 2011-07-12 16:34:31 +02:00
Pieter Noordhuis
628a961f86 Make test more exhaustive 2011-07-12 16:29:55 +02:00
Pieter Noordhuis
6e98f37390 Debugging output in tests 2011-07-12 16:29:38 +02:00
Pieter Noordhuis
9adb3aeda7 Apply segmented test to 64-bit extremes 2011-07-12 16:17:56 +02:00
Pieter Noordhuis
ee443ce59d Use 3 slices in the segmented data test 2011-07-12 16:15:25 +02:00
Pieter Noordhuis
45ed2729ee Change how parse outcome is compared 2011-07-12 16:01:49 +02:00
Pieter Noordhuis
87055888be Use macro 2011-07-12 12:56:01 +02:00
Pieter Noordhuis
b50af6c539 Jump directly to finalize from line state 2011-07-12 12:55:39 +02:00
Pieter Noordhuis
64288d2cc4 Add cursor field to protocol_t 2011-07-12 12:55:18 +02:00
Pieter Noordhuis
2fc0af5479 Base *_T constants on current constants for compat 2011-07-12 11:53:35 +02:00
Pieter Noordhuis
e43597aee8 Be more UNIXy (0 == success) 2011-07-12 10:34:40 +02:00
Pieter Noordhuis
21858350e8 More verbose type name 2011-07-12 10:33:45 +02:00
Pieter Noordhuis
095b376573 Use different parser in char-by-char tests
This fixes the test always succeeding because the redis_protocol_t in
the result is identical to the redis_protocol_t that is used as
reference when the same parser is used (lame bug).
2011-07-11 18:18:38 +02:00
Pieter Noordhuis
ec934e92d8 Parse status and error messages 2011-07-11 18:18:08 +02:00
Pieter Noordhuis
3c378b8422 Basic error facility 2011-07-07 14:13:36 +02:00