Add tests for crate exports ; add structure to imports/exports
This commit is contained in:
parent
1b4a307919
commit
7991cef904
7 changed files with 77 additions and 32 deletions
|
|
@ -8,13 +8,15 @@
|
|||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
||||
pub use tokio_xmpp;
|
||||
pub use tokio_xmpp::jid::{ResourcePart, ResourceRef};
|
||||
pub use tokio_xmpp::jid;
|
||||
pub use tokio_xmpp::minidom;
|
||||
pub use tokio_xmpp::parsers;
|
||||
|
||||
#[macro_use]
|
||||
extern crate log;
|
||||
|
||||
use core::fmt;
|
||||
use jid::{ResourcePart, ResourceRef};
|
||||
|
||||
pub mod agent;
|
||||
pub mod builder;
|
||||
|
|
@ -30,7 +32,6 @@ pub mod presence;
|
|||
pub mod pubsub;
|
||||
pub mod upload;
|
||||
|
||||
// Module re-exports
|
||||
pub use agent::Agent;
|
||||
pub use builder::{ClientBuilder, ClientType};
|
||||
pub use event::Event;
|
||||
|
|
@ -76,6 +77,21 @@ impl fmt::Display for RoomNick {
|
|||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[test]
|
||||
fn reexports() {
|
||||
#[allow(unused_imports)]
|
||||
use crate::jid;
|
||||
#[allow(unused_imports)]
|
||||
use crate::minidom;
|
||||
#[allow(unused_imports)]
|
||||
use crate::parsers;
|
||||
#[allow(unused_imports)]
|
||||
use crate::tokio_xmpp;
|
||||
}
|
||||
}
|
||||
|
||||
// The test below is dysfunctional since we have moved to StanzaStream. The
|
||||
// StanzaStream will attempt to connect to foo@bar indefinitely.
|
||||
// Keeping it here as inspiration for future integration tests.
|
||||
|
|
|
|||
Loading…
Reference in a new issue