tests/test_buffer.c

changeset 1026
ca20f9ffcb62
parent 1024
8f99f6c28bd3
parent 1023
989e144c912a
equal deleted inserted replaced
1025:439407fc29e1 1026:ca20f9ffcb62
975 buf.flags |= CX_BUFFER_AUTO_EXTEND; 975 buf.flags |= CX_BUFFER_AUTO_EXTEND;
976 CX_TEST_ASSERT(0 == cxBufferTerminate(&buf)); 976 CX_TEST_ASSERT(0 == cxBufferTerminate(&buf));
977 CX_TEST_ASSERT(buf.size == 8); 977 CX_TEST_ASSERT(buf.size == 8);
978 CX_TEST_ASSERT(buf.pos == 8); 978 CX_TEST_ASSERT(buf.pos == 8);
979 CX_TEST_ASSERT(buf.capacity > 8); 979 CX_TEST_ASSERT(buf.capacity > 8);
980 CX_TEST_ASSERT(0 == memcmp(buf.space, "preptest\0A", 10)); 980 CX_TEST_ASSERT(0 == memcmp(buf.space, "preptest\0", 9));
981 } 981 }
982 cxBufferDestroy(&buf); 982 cxBufferDestroy(&buf);
983 } 983 }
984 984
985 CX_TEST(test_buffer_write_size_overflow) { 985 CX_TEST(test_buffer_write_size_overflow) {

mercurial