compat mode that relaxes some of the check_* macros
This commit is contained in:
parent
1e85abd10c
commit
95f4ade4ba
17 changed files with 70 additions and 31 deletions
|
|
@ -18,6 +18,7 @@ impl MessagePayload for Attention {}
|
|||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
#[cfg(not(feature = "compat"))]
|
||||
use crate::error::Error;
|
||||
use minidom::Element;
|
||||
use try_from::TryFrom;
|
||||
|
|
@ -33,6 +34,7 @@ mod tests {
|
|||
Attention::try_from(elem).unwrap();
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "compat"))]
|
||||
#[test]
|
||||
fn test_invalid_child() {
|
||||
let elem: Element = "<attention xmlns='urn:xmpp:attention:0'><coucou/></attention>"
|
||||
|
|
@ -46,6 +48,7 @@ mod tests {
|
|||
assert_eq!(message, "Unknown child in attention element.");
|
||||
}
|
||||
|
||||
#[cfg(not(feature = "compat"))]
|
||||
#[test]
|
||||
fn test_invalid_attribute() {
|
||||
let elem: Element = "<attention xmlns='urn:xmpp:attention:0' coucou=''/>"
|
||||
|
|
|
|||
Loading…
Reference in a new issue