Remove dead code markers

This commit is contained in:
Alexander Krotov
2020-09-05 00:21:19 +03:00
committed by link2xt
parent 383c5ba7fd
commit a68528479f
5 changed files with 11 additions and 47 deletions

View File

@@ -2,7 +2,7 @@
use deltachat::config;
use deltachat::context::*;
use tempfile::{tempdir, TempDir};
use tempfile::tempdir;
/* some data used for testing
******************************************************************************/
@@ -92,26 +92,19 @@ async fn stress_functions(context: &Context) {
// free(qr.cast());
}
#[allow(dead_code)]
struct TestContext {
ctx: Context,
dir: TempDir,
}
async fn create_test_context() -> TestContext {
async fn create_test_context() -> Context {
use rand::Rng;
let dir = tempdir().unwrap();
let dbfile = dir.path().join("db.sqlite");
let id = rand::thread_rng().gen();
let ctx = Context::new("FakeOs".into(), dbfile.into(), id)
Context::new("FakeOs".into(), dbfile.into(), id)
.await
.unwrap();
TestContext { ctx, dir }
.unwrap()
}
#[async_std::test]
async fn test_stress_tests() {
let context = create_test_context().await;
stress_functions(&context.ctx).await;
stress_functions(&context).await;
}