35 lines
1013 B
Rust
35 lines
1013 B
Rust
//! Unit tests of this module (moved out of the file by STRA-338; the test ids are unchanged).
|
|
|
|
use super::*;
|
|
|
|
fn image(ids: &[i32]) -> SavedConversation {
|
|
image_mode(ids, true)
|
|
}
|
|
fn image_mode(ids: &[i32], cvec: bool) -> SavedConversation {
|
|
let mut s = SavedConversation::default();
|
|
s.live.ids = ids.to_vec();
|
|
s.live.gdn = vec![7; 64];
|
|
s.cvec = cvec;
|
|
s
|
|
}
|
|
fn cp(ids: &[i32]) -> ConversationCheckpoint {
|
|
ConversationCheckpoint { ids: ids.to_vec(), ..Default::default() }
|
|
}
|
|
fn with(prefix: &[i32], more: &[i32]) -> Vec<i32> {
|
|
let mut v = prefix.to_vec();
|
|
v.extend_from_slice(more);
|
|
v
|
|
}
|
|
fn exact_kv_layers() -> Vec<ConversationKv> {
|
|
let mut layer = ConversationKv::default();
|
|
layer.k.resize(400, 0).unwrap();
|
|
vec![layer]
|
|
}
|
|
const A: [i64; 4] = [1, 2, 3, 4];
|
|
const B: [i64; 4] = [9, 8, 7, 6];
|
|
|
|
#[path = "tests/retained_buffers_count_against_bytes.rs"]
|
|
mod retained_buffers_count_against_bytes;
|
|
#[path = "tests/what_is_not_superseded.rs"]
|
|
mod what_is_not_superseded;
|