Skip to content

Commit

Permalink
fix: Test refactor
Browse files Browse the repository at this point in the history
Moves the examples into binaries to allow them to be better called by the tests.
  • Loading branch information
Jonathan Woollett-Light committed Oct 23, 2023
1 parent e29209c commit a853749
Show file tree
Hide file tree
Showing 9 changed files with 6 additions and 9 deletions.
2 changes: 0 additions & 2 deletions log-instrument/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,4 @@ license = "Apache-2.0"
[dependencies]
log-instrument-macros = { path = "../log-instrument-macros", version = "0.2.0" }
log = "0.4.20"

[dev-dependencies]
env_logger = "0.10.0"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 0 additions & 1 deletion log-instrument/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ type InnerPath = Mutex<HashMap<std::thread::ThreadId, Vec<&'static str>>>;
static PATH: OnceLock<InnerPath> = OnceLock::new();
fn path() -> &'static InnerPath {
PATH.get_or_init(InnerPath::default)

}

pub struct __Instrument;
Expand Down
12 changes: 6 additions & 6 deletions log-instrument/tests/integration_tests.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
const ONE: &str = "../target/debug/examples/one";
const TWO: &str = "../target/debug/examples/two";
const THREE: &str = "../target/debug/examples/three";
const FOUR: &str = "../target/debug/examples/four";
const FIVE: &str = "../target/debug/examples/five";
const SIX: &str = "../target/debug/examples/six";
const ONE: &str = env!("CARGO_BIN_EXE_one");
const TWO: &str = env!("CARGO_BIN_EXE_two");
const THREE: &str = env!("CARGO_BIN_EXE_three");
const FOUR: &str = env!("CARGO_BIN_EXE_four");
const FIVE: &str = env!("CARGO_BIN_EXE_five");
const SIX: &str = env!("CARGO_BIN_EXE_six");

const TIMESTAMP_RANGE: std::ops::Range<usize> = 1..20;

Expand Down

0 comments on commit a853749

Please sign in to comment.