mirror of
https://github.com/Drop-OSS/drop.git
synced 2026-07-26 01:34:38 +10:00
@@ -9,8 +9,6 @@ pub mod download_manager;
|
|||||||
mod process;
|
mod process;
|
||||||
mod remote;
|
mod remote;
|
||||||
pub mod settings;
|
pub mod settings;
|
||||||
#[cfg(test)]
|
|
||||||
mod tests;
|
|
||||||
mod tools;
|
mod tools;
|
||||||
|
|
||||||
use crate::autostart::{get_autostart_enabled, toggle_autostart};
|
use crate::autostart::{get_autostart_enabled, toggle_autostart};
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
mod progress_tests;
|
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
/*
|
|
||||||
use atomic_counter::RelaxedCounter;
|
|
||||||
|
|
||||||
use crate::downloads::progress::ProgressChecker;
|
|
||||||
use std::sync::atomic::AtomicBool;
|
|
||||||
use std::sync::Arc;
|
|
||||||
|
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_progress_sequentially() {
|
|
||||||
let counter = Arc::new(RelaxedCounter::new(0));
|
|
||||||
let callback = Arc::new(AtomicBool::new(false));
|
|
||||||
let p = ProgressChecker::new(Box::new(test_fn), counter.clone(), callback, 100);
|
|
||||||
p.run_contexts_sequentially((1..100).collect());
|
|
||||||
println!("Progress: {}", p.get_progress_percentage());
|
|
||||||
}
|
|
||||||
#[test]
|
|
||||||
fn test_progress_parallel() {
|
|
||||||
let counter = Arc::new(RelaxedCounter::new(0));
|
|
||||||
let callback = Arc::new(AtomicBool::new(false));
|
|
||||||
let p = ProgressChecker::new(Box::new(test_fn), counter.clone(), callback, 100);
|
|
||||||
p.run_contexts_parallel_background((1..100).collect(), 10);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn test_fn(int: usize, _callback: Arc<AtomicBool>, _counter: Arc<RelaxedCounter>) {
|
|
||||||
println!("{}", int);
|
|
||||||
}
|
|
||||||
|
|
||||||
*/
|
|
||||||
Reference in New Issue
Block a user