Skip to content

Commit

Permalink
Rename 'test_cynthion' module to 'testing'.
Browse files Browse the repository at this point in the history
  • Loading branch information
martinling authored and miek committed Oct 31, 2024
1 parent b5322cc commit f937a53
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ mod database;
mod decoder;
mod item;
mod pcap;
mod test_cynthion;
mod testing;
mod ui;
mod usb;
mod util;
Expand All @@ -36,6 +36,7 @@ use gtk::prelude::*;
use gtk::gio::ApplicationFlags;
use gtk::glib::{self, OptionArg, OptionFlags};

use testing::test_cynthion;
use ui::{
activate,
display_error,
Expand All @@ -62,7 +63,7 @@ fn main() {
version_info(have_argument("--dependencies")));
} else if have_argument("--test-cynthion") {
let save_captures = have_argument("--save-captures");
test_cynthion::run_test(save_captures);
test_cynthion(save_captures);
} else {
if gtk::init().is_err() {
eprintln!("Failed to initialize GTK");
Expand Down
2 changes: 1 addition & 1 deletion src/test_cynthion.rs → src/testing.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ use std::time::{Duration, Instant};
const US: Duration = Duration::from_micros(1);
const MS: Duration = Duration::from_millis(1);

pub fn run_test(save_captures: bool) {
pub fn test_cynthion(save_captures: bool) {
for (name, speed, ep_addr, length, sof) in [
("HS", Speed::High, 0x81, 4096, Some((124*US, 126*US))),
("FS", Speed::Full, 0x82, 512, Some((995*US, 1005*US))),
Expand Down

0 comments on commit f937a53

Please sign in to comment.