Fixed some neovim test context issues, added repeated commands in vim mode, and ported some tests to use the neovim testing strategy

This commit is contained in:
K Simmons
2022-10-08 21:52:07 -07:00
parent b82db3a254
commit 515c1ea123
971 changed files with 837 additions and 11897 deletions
+3
View File
@@ -182,6 +182,7 @@ pub struct TestAppContext {
cx: Rc<RefCell<MutableAppContext>>,
foreground_platform: Rc<platform::test::ForegroundPlatform>,
condition_duration: Option<Duration>,
pub function_name: String,
}
pub struct WindowInputHandler {
@@ -437,6 +438,7 @@ impl TestAppContext {
font_cache: Arc<FontCache>,
leak_detector: Arc<Mutex<LeakDetector>>,
first_entity_id: usize,
function_name: String,
) -> Self {
let mut cx = MutableAppContext::new(
foreground,
@@ -456,6 +458,7 @@ impl TestAppContext {
cx: Rc::new(RefCell::new(cx)),
foreground_platform,
condition_duration: None,
function_name,
};
cx.cx.borrow_mut().weak_self = Some(Rc::downgrade(&cx.cx));
cx
+2
View File
@@ -37,6 +37,7 @@ pub fn run_test(
u64,
bool,
)),
fn_name: String,
) {
// let _profiler = dhat::Profiler::new_heap();
@@ -78,6 +79,7 @@ pub fn run_test(
font_cache.clone(),
leak_detector.clone(),
0,
fn_name.clone(),
);
cx.update(|cx| {
test_fn(