use mullama::*;
#[test]
fn test_basic_structures() {
let model_params = ModelParams::default();
assert!(!model_params.vocab_only);
let context_params = ContextParams::default();
assert!(context_params.n_threads > 0);
let sampler_params = SamplerParams::default();
assert_eq!(sampler_params.temperature, 0.8);
}
#[test]
fn test_error_types() {
let error = MullamaError::ModelLoadError("test error".to_string());
assert!(error.to_string().contains("test error"));
}
#[test]
fn test_token_structure() {
let token = Token {
id: 123,
text: "test".to_string(),
score: 0.5,
attr: mullama::sys::llama_token_attr::LLAMA_TOKEN_ATTR_NORMAL,
};
assert_eq!(token.id, 123);
assert_eq!(token.text, "test");
assert_eq!(token.score, 0.5);
}
#[test]
fn test_batch_creation() {
let batch = Batch::default();
assert!(batch.is_empty());
}
#[test]
fn test_session_creation() {
let session = Session {
data: vec![1, 2, 3],
};
assert_eq!(session.data.len(), 3);
}
#[test]
fn test_memory_manager() {
let memory_manager = MemoryManager::new();
assert!(!memory_manager.is_valid());
}
#[test]
fn test_vocabulary() {
let vocab = Vocabulary::new();
assert_eq!(vocab._placeholder, 0);
}