diff options
| author | Yuval Adam <_@yuv.al> | 2018-07-29 13:42:05 +0300 |
|---|---|---|
| committer | Yuval Adam <_@yuv.al> | 2018-07-29 13:42:05 +0300 |
| commit | e3f2a44ed678bc8de6748fc0af3540f881871e1f (patch) | |
| tree | 7f20056f980d19610a392747a90604190515146f | |
| parent | 92f7a55b1c2111027e12b0b1958782afb5bec47d (diff) | |
Add --nocapture flag to test in README
| -rw-r--r-- | README.md | 2 | ||||
| -rw-r--r-- | src/lib.rs | 4 |
2 files changed, 3 insertions, 3 deletions
@@ -37,7 +37,7 @@ The usual: ```bash $ cargo build -$ cargo test +$ cargo test -- --nocapture ``` Since there isn't (?) any good USB device mocking setup, for tests to pass an RTL-SDR device must be connected. @@ -196,7 +196,7 @@ impl<'a> RtlSdr<'a> { self.demod_write_reg(&handle, 0, 0x0d, 0x83, 1); } - pub fn init(&mut self) { + pub fn open(&mut self) { for mut dev in self.ctx.devices().unwrap().iter() { let desc = dev.device_descriptor().unwrap(); let vid = desc.vendor_id(); @@ -250,6 +250,6 @@ mod tests { fn test_init() { let ctx = libusb::Context::new().unwrap(); let mut rtlsdr = RtlSdr::new(&ctx); - rtlsdr.init(); + rtlsdr.open(); } } |
