<commit_before>/*
 * Test for EinaList.
 */

extern crate efl;

use efl::eina;

fn main() {

    eina::init();

    let mut strlst: *mut eina::EinaList<&'static str> = 
        eina::list_append(None, &&"Rust");

    println!("Last Value? {}", eina::list_last_data_get(strlst));
    println!("Next Value? {}", eina::list_next(strlst));
    println!("Previous Value? {}", eina::list_prev(strlst));

    // Prepend a new node
    strlst = eina::list_prepend(Some(strlst), &&"rust-efl");
    println!("First Value: {}", eina::list_data_get(strlst));

    strlst = eina::list_append(Some(strlst), &&"EFL");
    strlst = eina::list_append(Some(strlst), &&"Rust EFL!");

    let next =
        match eina::list_next(strlst) {
            None => {
                println!("No next! Returning same");
                strlst
            }
            Some(next) => { 
                println!("Next: {}", eina::list_data_get(next));
                next
            }
        };

    let last =
        match eina::list_last(strlst) {
            None => { fail!("No last?!") }
            Some(last) => {
                println!("Last Value: {}", eina::list_data_get(last));
                last
            }
        };

    // Change first value
    let v: &&'static str = &&"Rust Enlightenment";
    eina::list_data_set(strlst, v);
    // Change last value
    let n: &&'static str = &&"EnLiGhTeNmEnT";
    eina::list_data_set(last, n);

    println!("First New Value: {}", eina::list_data_get(strlst));
    println!("Next still: {}", eina::list_data_get(next));
    println!("Last New Value: {}", eina::list_last_data_get(strlst));

    // Change next value
    let t = &&"Enlightenment through Rust!";
    println!("Old next: {}, changing!", eina::list_data_set(next, t));
    println!("Next value changed to: {}", eina::list_data_get(next));

    println!("List count: {}", eina::list_count(strlst));
    // Add new node
    strlst = eina::list_append(Some(strlst), &&"e rust");
    println!("List new count: {}", eina::list_count(strlst));
    println!("New added value {}", eina::list_last_data_get(strlst));

    eina::list_free(strlst);
    eina::shutdown();

}<commit_msg>Adapt test for the removal of &"string" notation<commit_after>/*
 * Test for EinaList.
 */

extern crate efl;

use efl::eina;

fn main() {

    eina::init();

    let mut strlst: *mut eina::EinaList<&'static str> = 
        eina::list_append(None, &("Rust"));

    println!("Last Value? {}", eina::list_last_data_get(strlst));
    println!("Next Value? {}", eina::list_next(strlst));
    println!("Previous Value? {}", eina::list_prev(strlst));

    // Prepend a new node
    strlst = eina::list_prepend(Some(strlst), &("rust-efl"));
    println!("First Value: {}", eina::list_data_get(strlst));

    strlst = eina::list_append(Some(strlst), &("EFL"));
    strlst = eina::list_append(Some(strlst), &("Rust EFL!"));

    let next =
        match eina::list_next(strlst) {
            None => {
                println!("No next! Returning same");
                strlst
            }
            Some(next) => { 
                println!("Next: {}", eina::list_data_get(next));
                next
            }
        };

    let last =
        match eina::list_last(strlst) {
            None => { fail!("No last?!") }
            Some(last) => {
                println!("Last Value: {}", eina::list_data_get(last));
                last
            }
        };

    // Change first value
    let v: &&'static str = &("Rust Enlightenment");
    eina::list_data_set(strlst, v);
    // Change last value
    let n: &&'static str = &("EnLiGhTeNmEnT");
    eina::list_data_set(last, n);

    println!("First New Value: {}", eina::list_data_get(strlst));
    println!("Next still: {}", eina::list_data_get(next));
    println!("Last New Value: {}", eina::list_last_data_get(strlst));

    // Change next value
    let t = &("Enlightenment through Rust!");
    println!("Old next: {}, changing!", eina::list_data_set(next, t));
    println!("Next value changed to: {}", eina::list_data_get(next));

    println!("List count: {}", eina::list_count(strlst));
    // Add new node
    strlst = eina::list_append(Some(strlst), &("e rust"));
    println!("List new count: {}", eina::list_count(strlst));
    println!("New added value {}", eina::list_last_data_get(strlst));

    eina::list_free(strlst);
    eina::shutdown();

}
{'fraction_non_alphanumeric': 0.1852693794044101, 'fraction_numerical': 0.0, 'mean_word_length': 2.8194444444444446, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, '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': '7417673', 'n_tokens_mistral': 1506, 'n_tokens_neox': 1480, 'n_words': 291}