Init env_logger
in the editor
crate for tests only
This commit is contained in:
parent
b9c459e800
commit
fe786f3366
3 changed files with 10 additions and 0 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -1622,6 +1622,8 @@ dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"buffer",
|
"buffer",
|
||||||
"clock",
|
"clock",
|
||||||
|
"ctor",
|
||||||
|
"env_logger",
|
||||||
"gpui",
|
"gpui",
|
||||||
"language",
|
"language",
|
||||||
"lazy_static",
|
"lazy_static",
|
||||||
|
|
|
@ -31,6 +31,8 @@ smol = "1.2"
|
||||||
buffer = { path = "../buffer", features = ["test-support"] }
|
buffer = { path = "../buffer", features = ["test-support"] }
|
||||||
language = { path = "../language", features = ["test-support"] }
|
language = { path = "../language", features = ["test-support"] }
|
||||||
gpui = { path = "../gpui", features = ["test-support"] }
|
gpui = { path = "../gpui", features = ["test-support"] }
|
||||||
|
ctor = "0.1"
|
||||||
|
env_logger = "0.8"
|
||||||
rand = "0.8"
|
rand = "0.8"
|
||||||
unindent = "0.1.7"
|
unindent = "0.1.7"
|
||||||
tree-sitter = "0.19"
|
tree-sitter = "0.19"
|
||||||
|
|
|
@ -2,6 +2,12 @@ use gpui::{Entity, ModelHandle};
|
||||||
use smol::channel;
|
use smol::channel;
|
||||||
use std::marker::PhantomData;
|
use std::marker::PhantomData;
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
#[ctor::ctor]
|
||||||
|
fn init_logger() {
|
||||||
|
env_logger::init();
|
||||||
|
}
|
||||||
|
|
||||||
pub fn sample_text(rows: usize, cols: usize) -> String {
|
pub fn sample_text(rows: usize, cols: usize) -> String {
|
||||||
let mut text = String::new();
|
let mut text = String::new();
|
||||||
for row in 0..rows {
|
for row in 0..rows {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue