ki18n-rs/tests/klocalizedstring_tests.rs
Ayush Singh cb934ff6dc Added KLocalizedString Wrapper.
Only added applicationDomain related methods.
2021-12-14 18:15:49 +05:30

15 lines
412 B
Rust

use ki18n_rs::klocalizedstring::KLocalizedString;
use std::ffi::CString;
#[test]
fn application_domain() {
const APPLICATION_DOMAIN: &str = "KI18n";
let domain = CString::new(APPLICATION_DOMAIN).unwrap();
KLocalizedString::set_application_domain(&domain);
let domain = KLocalizedString::application_domain();
println!("{:#?}", domain);
assert_eq!(domain.to_str().unwrap(), "KI18n");
}