tests: add unit tests covered with Clang sanitizers
[project/libubox.git] / tests / cram / test_list.t
1 check that list is producing expected results:
2
3 $ [ -n "$TEST_BIN_DIR" ] && export PATH="$TEST_BIN_DIR:$PATH"
4 $ valgrind --quiet --leak-check=full test-list
5 test_basics: list_empty: yes
6 test_basics: list_add_tail: zero one two three four five six seven eight nine ten eleven twelve
7 test_basics: list_empty: no
8 test_basics: first=zero last=twelve
9 test_basics: 'zero' is first, yes
10 test_basics: 'twelve' is last, yes
11 test_basics: removing 'twelve' and 'zero'
12 test_basics: first=one last=eleven
13 test_basics: 'one' is first, yes
14 test_basics: 'eleven' is last, yes
15 test_basics: moving 'one' to the tail
16 test_basics: first=two last=one
17 test_basics: 'two' is first, yes
18 test_basics: 'one' is last, yes
19 test_basics: list_for_each_entry: two three four five six seven eight nine ten eleven one
20 test_basics: list_for_each_entry_reverse: one eleven ten nine eight seven six five four three two
21 test_basics: delete all entries
22 test_basics: list_empty: yes
23
24 $ test-list-san
25 test_basics: list_empty: yes
26 test_basics: list_add_tail: zero one two three four five six seven eight nine ten eleven twelve
27 test_basics: list_empty: no
28 test_basics: first=zero last=twelve
29 test_basics: 'zero' is first, yes
30 test_basics: 'twelve' is last, yes
31 test_basics: removing 'twelve' and 'zero'
32 test_basics: first=one last=eleven
33 test_basics: 'one' is first, yes
34 test_basics: 'eleven' is last, yes
35 test_basics: moving 'one' to the tail
36 test_basics: first=two last=one
37 test_basics: 'two' is first, yes
38 test_basics: 'one' is last, yes
39 test_basics: list_for_each_entry: two three four five six seven eight nine ten eleven one
40 test_basics: list_for_each_entry_reverse: one eleven ten nine eight seven six five four three two
41 test_basics: delete all entries
42 test_basics: list_empty: yes