fixes for tests to be run in release-mode
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
@@ -9,6 +9,7 @@ mod raw_id;
|
|||||||
mod redact;
|
mod redact;
|
||||||
mod relation;
|
mod relation;
|
||||||
mod strip;
|
mod strip;
|
||||||
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
mod unsigned;
|
mod unsigned;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,3 @@
|
|||||||
#![cfg(test)]
|
|
||||||
|
|
||||||
use super::Count;
|
use super::Count;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ pub mod set;
|
|||||||
pub mod stream;
|
pub mod stream;
|
||||||
pub mod string;
|
pub mod string;
|
||||||
pub mod sys;
|
pub mod sys;
|
||||||
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
pub mod time;
|
pub mod time;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#![cfg(test)]
|
|
||||||
#![allow(clippy::disallowed_methods)]
|
#![allow(clippy::disallowed_methods)]
|
||||||
|
|
||||||
use crate::utils;
|
use crate::utils;
|
||||||
|
|||||||
@@ -11,6 +11,7 @@ mod opts;
|
|||||||
mod pool;
|
mod pool;
|
||||||
mod ser;
|
mod ser;
|
||||||
mod stream;
|
mod stream;
|
||||||
|
#[cfg(test)]
|
||||||
mod tests;
|
mod tests;
|
||||||
pub(crate) mod util;
|
pub(crate) mod util;
|
||||||
mod watchers;
|
mod watchers;
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
#![cfg(test)]
|
|
||||||
#![allow(clippy::needless_borrows_for_generic_args)]
|
#![allow(clippy::needless_borrows_for_generic_args)]
|
||||||
|
|
||||||
use std::fmt::Debug;
|
use std::fmt::Debug;
|
||||||
@@ -14,7 +13,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "serializing string at the top-level")]
|
#[cfg_attr(debug_assertions, should_panic(expected = "serializing string at the top-level"))]
|
||||||
fn ser_str() {
|
fn ser_str() {
|
||||||
let user_id: &UserId = "@user:example.com".try_into().unwrap();
|
let user_id: &UserId = "@user:example.com".try_into().unwrap();
|
||||||
let s = serialize_to_vec(&user_id).expect("failed to serialize user_id");
|
let s = serialize_to_vec(&user_id).expect("failed to serialize user_id");
|
||||||
@@ -139,7 +138,7 @@ fn ser_json_macro() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "serializing string at the top-level")]
|
#[cfg_attr(debug_assertions, should_panic(expected = "serializing string at the top-level"))]
|
||||||
fn ser_json_raw() {
|
fn ser_json_raw() {
|
||||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||||
|
|
||||||
@@ -156,7 +155,7 @@ fn ser_json_raw() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
#[should_panic(expected = "you can skip serialization instead")]
|
#[cfg_attr(debug_assertions, should_panic(expected = "you can skip serialization instead"))]
|
||||||
fn ser_json_raw_json() {
|
fn ser_json_raw_json() {
|
||||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user