Improved Documentation

Added some doc tests as examples.
This commit is contained in:
Ayush Singh 2021-12-14 18:28:10 +05:30
parent cb934ff6dc
commit 57fefcc945
4 changed files with 25 additions and 9 deletions

View file

@ -2,14 +2,6 @@ use ki18n_rs::klocalizedcontext::KLocalizedContext;
use qmetaobject::prelude::*;
mod common;
#[test]
fn init_engine() {
let _lock = common::lock_for_test();
let engine = QmlEngine::new();
KLocalizedContext::init_from_engine(&engine);
}
#[test]
fn cpp_ptr() {
let _lock = common::lock_for_test();

View file

@ -8,7 +8,6 @@ fn application_domain() {
KLocalizedString::set_application_domain(&domain);
let domain = KLocalizedString::application_domain();
println!("{:#?}", domain);
assert_eq!(domain.to_str().unwrap(), "KI18n");
}