Skip to content

Commit

Permalink
fix makefile and some general clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
gregoryyoung committed May 5, 2016
1 parent 053d702 commit bebe0ce
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
2 changes: 1 addition & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ $(TARGET): $(OBJECTS)
$(CC) $(CFLAGS) $(OBJECTS) $(LIBS) -o $@

clean:
-rm -f *.o
-rm -f src/*.o
-rm -f $(TARGET)
test:
./es_tests
Expand Down
2 changes: 0 additions & 2 deletions src/es_client_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,4 @@
#include "es_proto_helper.h"


#define TESTS

#endif
10 changes: 5 additions & 5 deletions src/es_msg_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,8 +150,8 @@ char data[24] = {0x0A,0,0,0,0,1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7,8,9};

static void test_parser_create() {
struct ParserState *state = create_parser_state(32);
CU_ASSERT_PTR_NOT_NULL (state->buffer_end);
CU_ASSERT_PTR_NOT_NULL (state->buffer_start);
CU_ASSERT_PTR_NOT_NULL_FATAL (state->buffer_end);
CU_ASSERT_PTR_NOT_NULL_FATAL (state->buffer_start);
CU_ASSERT (state->parser_read == state->buffer_start);
CU_ASSERT (state->buffer_start == state->buffer_write);
destroy_parser_state (&state);
Expand Down Expand Up @@ -201,7 +201,7 @@ static void test_compress (void) {
b.location[0] = 0x0B;
add_data (state, &b);
struct Buffer * read = read_next (state);
CU_ASSERT_PTR_NOT_NULL (read);
CU_ASSERT_PTR_NOT_NULL_FATAL (read);
assert (state->buffer_write - state->buffer_start == 20);
CU_ASSERT_EQUAL (state->parser_read, state->buffer_start + 14);
compress_space (state);
Expand Down Expand Up @@ -236,7 +236,7 @@ static void test_perfect_fit_read (void) {
CU_ASSERT_EQUAL (add_data (state, &b), 0);
char *old_parser_read = state->parser_read;
struct Buffer *ret = read_next (state);
CU_ASSERT_PTR_NOT_NULL (ret);
CU_ASSERT_PTR_NOT_NULL_FATAL (ret);
CU_ASSERT (ret->location == state->buffer_start + 4);
CU_ASSERT_EQUAL (ret->length,10);
CU_ASSERT (old_parser_read + 14 == state->parser_read);
Expand All @@ -252,7 +252,7 @@ static void test_too_much_data_read (void) {
CU_ASSERT_EQUAL (add_data (state, &b), 0);
char *old_parser_read = state->parser_read;
struct Buffer *ret = read_next (state);
CU_ASSERT_PTR_NOT_NULL (ret);
CU_ASSERT_PTR_NOT_NULL_FATAL (ret);
CU_ASSERT (ret->location == state->buffer_start + 4);
CU_ASSERT_EQUAL (ret->length,10);
CU_ASSERT (old_parser_read + 14 == state->parser_read);
Expand Down
1 change: 1 addition & 0 deletions src/es_proto_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,7 @@ void test_subscribe_to_stream (void) {
void test_subscription_confirmation (void) {
struct SubscriptionConfirmation d;
d.last_commit_position = 1919;
d.last_commit_position = 1919;
d.last_event_number = 6;
struct Buffer buffer = get_test_buffer(1024);
int32_t len = es_pack_subscription_confirmation (&d, buffer);
Expand Down

0 comments on commit bebe0ce

Please sign in to comment.