<commit_before>extern crate rosc;

use rosc::{encoder, decoder, errors};
use rosc::errors::OscError;
use rosc::types::{Result, OscMessage, OscPacket};

#[test]
fn test_encode_message_wo_args() {
    let msg = OscMessage {
        addr: "/some/addr".to_string(),
        args: None,
    };

    let enc_msg = encoder::encode_message(&msg).unwrap();
    match decoder::decode(&enc_msg).unwrap() {
        OscPacket::Message(dec_msg) => assert_eq!("/some/addr", dec_msg.addr),
        _ => panic!("Expected OSC message!")
    }<commit_msg>Check agains `addr` field of source `msg`<commit_after>extern crate rosc;

use rosc::{encoder, decoder, errors};
use rosc::errors::OscError;
use rosc::types::{Result, OscMessage, OscPacket};

#[test]
fn test_encode_message_wo_args() {
    let msg = OscMessage {
        addr: "/some/addr".to_string(),
        args: None,
    };

    let enc_msg = encoder::encode_message(&msg).unwrap();
    match decoder::decode(&enc_msg).unwrap() {
        OscPacket::Message(dec_msg) => assert_eq!(msg.addr, dec_msg.addr),
        _ => panic!("Expected OSC message!"),
    }
{'fraction_non_alphanumeric': 0.1659070191431176, 'fraction_numerical': 0.0, 'mean_word_length': 4.036697247706422, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, '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': '4473789', 'n_tokens_mistral': 373, 'n_tokens_neox': 373, 'n_words': 74}