diff --git a/Cargo.toml b/Cargo.toml index 28926cb9..2ec87410 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,6 +2,7 @@ members = [ "matrix_sdk", "matrix_sdk_base", + "matrix_sdk_test", "matrix_sdk_crypto", "matrix_sdk_common", ] diff --git a/matrix_sdk_base/Cargo.toml b/matrix_sdk_base/Cargo.toml index f2e3b5d6..9056089d 100644 --- a/matrix_sdk_base/Cargo.toml +++ b/matrix_sdk_base/Cargo.toml @@ -45,6 +45,7 @@ default-features = false features = ["sync", "time", "fs"] [dev-dependencies] +matrix-sdk-test = { version = "0.1.0", path = "../matrix_sdk_test" } tokio = { version = "0.2.20", features = ["rt-threaded", "macros"] } ruma-identifiers = { version = "0.16.1", features = ["rand"] } serde_json = "1.0.52" diff --git a/matrix_sdk_base/src/lib.rs b/matrix_sdk_base/src/lib.rs index 97b5015a..fdc5173b 100644 --- a/matrix_sdk_base/src/lib.rs +++ b/matrix_sdk_base/src/lib.rs @@ -37,9 +37,6 @@ mod models; mod session; mod state; -#[cfg(test)] -pub mod test_builder; - pub use base_client::{Client, RoomState, RoomStateType}; pub use event_emitter::EventEmitter; #[cfg(feature = "encryption")] diff --git a/matrix_sdk_base/src/models/room.rs b/matrix_sdk_base/src/models/room.rs index 36832d96..9ee27183 100644 --- a/matrix_sdk_base/src/models/room.rs +++ b/matrix_sdk_base/src/models/room.rs @@ -524,8 +524,8 @@ mod test { use crate::api::r0::sync::sync_events::Response as SyncResponse; use crate::events::room::member::MembershipState; use crate::identifiers::UserId; - use crate::test_builder::EventBuilder; use crate::{Client, Session}; + use matrix_sdk_test::EventBuilder; use http::Response; diff --git a/matrix_sdk_base/src/models/room_member.rs b/matrix_sdk_base/src/models/room_member.rs index dae638aa..e559b921 100644 --- a/matrix_sdk_base/src/models/room_member.rs +++ b/matrix_sdk_base/src/models/room_member.rs @@ -199,10 +199,11 @@ impl RoomMember { #[cfg(test)] mod test { + use matrix_sdk_test::EventBuilder; + use crate::events::collections::all::RoomEvent; use crate::events::room::member::MembershipState; use crate::identifiers::{RoomId, UserId}; - use crate::test_builder::EventBuilder; use crate::{Client, Session}; use crate::js_int::Int; diff --git a/matrix_sdk_test/Cargo.toml b/matrix_sdk_test/Cargo.toml new file mode 100644 index 00000000..4106118c --- /dev/null +++ b/matrix_sdk_test/Cargo.toml @@ -0,0 +1,16 @@ +[package] +authors = ["Damir Jelić