Mercurial > crates > nonstick
comparison testharness/src/bin/testharness.rs @ 173:46e8ce5cd5d1
Miscellaneous doc and code cleanups.
author | Paul Fisher <paul@pfish.zone> |
---|---|
date | Tue, 29 Jul 2025 16:52:32 -0400 |
parents | 6727cbe56f4a |
children | a8c814843ccb |
comparison
equal
deleted
inserted
replaced
172:6727cbe56f4a | 173:46e8ce5cd5d1 |
---|---|
10 use std::cell::Cell; | 10 use std::cell::Cell; |
11 use std::collections::HashMap; | 11 use std::collections::HashMap; |
12 use std::ffi::OsString; | 12 use std::ffi::OsString; |
13 use std::os::unix::ffi::OsStrExt; | 13 use std::os::unix::ffi::OsStrExt; |
14 | 14 |
15 macro_rules! run { | |
16 ($x:expr) => { | |
17 eprintln!("START {}", stringify!($x)); | |
18 $x; | |
19 eprintln!("..END {}", stringify!($x)); | |
20 }; | |
21 } | |
22 | |
15 fn main() { | 23 fn main() { |
16 test_wrong_user(); | 24 run!(test_wrong_user()); |
17 test_wrong_password(); | 25 run!(test_wrong_password()); |
18 test_correct(); | 26 run!(test_correct()); |
19 } | 27 } |
20 | 28 |
21 #[derive(Debug, Default)] | 29 #[derive(Debug, Default)] |
22 struct TestHarness { | 30 struct TestHarness { |
23 username_requested: Cell<bool>, | 31 username_requested: Cell<bool>, |