Expand description
Test utilities for kernel-level testing.
Provides shared helpers used by all modules and drivers that need
a real in-memory BufferManager for testing. This eliminates the
need to duplicate TestBufferManager and create_test_context()
across 30+ test modules.
§Usage
ⓘ
use reovim_kernel::testing::{create_test_context, setup_buffer};
let ctx = create_test_context();
let buffer_id = setup_buffer(&ctx, "hello world");§Architecture
This module is unconditionally compiled (not #[cfg(test)]) so that
downstream crates can use it in their test modules. This follows the
same pattern as reovim_driver_session::testing.
Structs§
- Test
Buffer Manager - In-memory buffer manager for testing.
Functions§
- create_
test_ context - Create a
KernelContextwith a real in-memory buffer manager. - setup_
buffer - Create a buffer with content and register it in the context.
- test_
mode - Standard test mode ID for unit tests.