fixes for tests to be run in release-mode
Signed-off-by: Jason Volk <jason@zemos.net>
This commit is contained in:
parent
94c8683836
commit
44e6b1af3c
6 changed files with 6 additions and 7 deletions
|
@ -9,6 +9,7 @@ mod raw_id;
|
|||
mod redact;
|
||||
mod relation;
|
||||
mod strip;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
mod unsigned;
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
#![cfg(test)]
|
||||
|
||||
use super::Count;
|
||||
|
||||
#[test]
|
||||
|
|
|
@ -16,6 +16,7 @@ pub mod set;
|
|||
pub mod stream;
|
||||
pub mod string;
|
||||
pub mod sys;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
pub mod time;
|
||||
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#![cfg(test)]
|
||||
#![allow(clippy::disallowed_methods)]
|
||||
|
||||
use crate::utils;
|
||||
|
|
|
@ -11,6 +11,7 @@ mod opts;
|
|||
mod pool;
|
||||
mod ser;
|
||||
mod stream;
|
||||
#[cfg(test)]
|
||||
mod tests;
|
||||
pub(crate) mod util;
|
||||
mod watchers;
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#![cfg(test)]
|
||||
#![allow(clippy::needless_borrows_for_generic_args)]
|
||||
|
||||
use std::fmt::Debug;
|
||||
|
@ -14,7 +13,7 @@ use crate::{
|
|||
};
|
||||
|
||||
#[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() {
|
||||
let user_id: &UserId = "@user:example.com".try_into().unwrap();
|
||||
let s = serialize_to_vec(&user_id).expect("failed to serialize user_id");
|
||||
|
@ -139,7 +138,7 @@ fn ser_json_macro() {
|
|||
}
|
||||
|
||||
#[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() {
|
||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
|
@ -156,7 +155,7 @@ fn ser_json_raw() {
|
|||
}
|
||||
|
||||
#[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() {
|
||||
use conduwuit::ruma::api::client::filter::FilterDefinition;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue