Move tests and support utilities to sub crates. (#268)
These crates will not be published to crates.io, but moving them allows `tower-h2` to also depend on the test utilities.
This commit is contained in:
36
tests/h2-support/src/lib.rs
Normal file
36
tests/h2-support/src/lib.rs
Normal file
@@ -0,0 +1,36 @@
|
||||
//! Utilities to support tests.
|
||||
|
||||
pub extern crate bytes;
|
||||
pub extern crate env_logger;
|
||||
#[macro_use]
|
||||
pub extern crate futures;
|
||||
pub extern crate h2;
|
||||
pub extern crate http;
|
||||
pub extern crate string;
|
||||
#[macro_use]
|
||||
pub extern crate tokio_io;
|
||||
|
||||
#[macro_use]
|
||||
mod assert;
|
||||
|
||||
pub mod raw;
|
||||
|
||||
pub mod frames;
|
||||
pub mod prelude;
|
||||
pub mod mock;
|
||||
pub mod mock_io;
|
||||
pub mod notify;
|
||||
pub mod util;
|
||||
|
||||
mod future_ext;
|
||||
|
||||
pub use future_ext::{FutureExt, Unwrap};
|
||||
|
||||
pub type WindowSize = usize;
|
||||
pub const DEFAULT_WINDOW_SIZE: WindowSize = (1 << 16) - 1;
|
||||
|
||||
// This is our test Codec type
|
||||
pub type Codec<T> = h2::Codec<T, ::std::io::Cursor<::bytes::Bytes>>;
|
||||
|
||||
// This is the frame type that is sent
|
||||
pub type SendFrame = h2::frame::Frame<::std::io::Cursor<::bytes::Bytes>>;
|
||||
Reference in New Issue
Block a user