Browse Source

Search file init tests enhancement

Yann Weber 7 years ago
parent
commit
54cdb23b1d
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      tests/ttail_search_check.c

+ 7
- 1
tests/ttail_search_check.c View File

@@ -17,9 +17,14 @@ void teardown_closest(void)
17 17
 	ttail_free(ttail);
18 18
 }
19 19
 
20
-void setup_closest_fileinit(void)
20
+void setup_closest(void)
21 21
 {
22 22
 	ttail = ttail_init(1, (char**)&"foo");
23
+}
24
+
25
+void setup_closest_fileinit(void)
26
+{
27
+	setup_closest();
23 28
 	size_t i;
24 29
 	for(i=0; i<5; i++)
25 30
 	{
@@ -33,6 +38,7 @@ START_TEST (test_search_closest_init)
33 38
 
34 39
 	ret = ttail_search_closest(ttail);
35 40
 	ck_assert_int_eq(ret,0);
41
+	ck_assert(ttail->session->file.vpos == 0);
36 42
 	#ifdef HUGEFILE
37 43
 	ck_assert_int_eq(ttail->session->file.sz_div,0);
38 44
 	#endif

Loading…
Cancel
Save