<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>



#include "unit_tests.h"
#include "list.h"









ptest_func tests[] =
{

};



int main(void)
{

    RUN_TESTS(tests);<commit_msg>Tests: list.h - add test_list_empty<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>



#include "unit_tests.h"
#include "list.h"





struct tmp_data
{
   struct list_head list;
   int              data;
};





int test_list_empty(struct test_info_t  *test_info)
{

    TEST_INIT;

    DECLARE_LIST_HEAD(tmp_list);
    struct tmp_data d1;


    if(!list_empty(&tmp_list))              //list must be empty
        return TEST_BROKEN;


    list_push_front(&d1.list, &tmp_list);   //now d1 is first

    if(list_empty(&tmp_list))               //now list is NOT empty
        return TEST_BROKEN;


    return TEST_PASSED;
}



ptest_func tests[] =
{
    test_list_empty,
};



int main(void)
{

    RUN_TESTS(tests);
{'fraction_non_alphanumeric': 0.12223393045310854, 'fraction_numerical': 0.003161222339304531, 'mean_word_length': 2.7254901960784315, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1413044', 'n_tokens_mistral': 386, 'n_tokens_neox': 347, 'n_words': 72}