aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_linebuffer.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_linebuffer.c')
-rw-r--r--tests/test_linebuffer.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/test_linebuffer.c b/tests/test_linebuffer.c
index ae233cc..6d84780 100644
--- a/tests/test_linebuffer.c
+++ b/tests/test_linebuffer.c
@@ -10,17 +10,19 @@
#include <string.h>
/**
- * GIVEN a specific buffer capacity
+ * GIVEN a specific line width
* WHEN we attempt to create a LineBuffer
* THEN we expect it to be created successfully
* with the expected internal state
*/
void test_linebuffer_create(void **state) {
- const int buffer_capacity = 50;
- LineBuffer *lb = linebuffer_create(buffer_capacity);
+ const int line_width = 50;
+ LineBuffer *lb = linebuffer_create(line_width);
assert_non_null(lb);
- assert_int_equal(lb->_buffer_capacity, buffer_capacity);
+ assert_int_equal(lb->_line_width, line_width);
+ assert_int_equal(lb->_buffer_capacity, line_width * 4);
assert_int_equal(lb->_buffer_length, 0);
+ assert_int_equal(lb->_display_width, 0);
assert_int_equal(lb->_num_words, 0);
linebuffer_destroy(lb);
}