mirror of
https://gitlab.com/xmpp-rs/xmpp-rs.git
synced 2024-07-12 22:21:53 +00:00
jingle_ice_udp, jingle_rtp: Add a size test.
This commit is contained in:
parent
5592c11745
commit
7fc5dea4d6
2 changed files with 34 additions and 0 deletions
|
@ -90,6 +90,22 @@ mod tests {
|
||||||
use minidom::Element;
|
use minidom::Element;
|
||||||
use try_from::TryFrom;
|
use try_from::TryFrom;
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
#[test]
|
||||||
|
fn test_size() {
|
||||||
|
assert_size!(Transport, 36);
|
||||||
|
assert_size!(Type, 1);
|
||||||
|
assert_size!(Candidate, 72);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
#[test]
|
||||||
|
fn test_size() {
|
||||||
|
assert_size!(Transport, 72);
|
||||||
|
assert_size!(Type, 1);
|
||||||
|
assert_size!(Candidate, 104);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_simple() {
|
fn test_simple() {
|
||||||
let elem: Element = "
|
let elem: Element = "
|
||||||
|
|
|
@ -78,6 +78,24 @@ mod tests {
|
||||||
use minidom::Element;
|
use minidom::Element;
|
||||||
use try_from::TryFrom;
|
use try_from::TryFrom;
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "32")]
|
||||||
|
#[test]
|
||||||
|
fn test_size() {
|
||||||
|
assert_size!(Description, 36);
|
||||||
|
assert_size!(Channels, 1);
|
||||||
|
assert_size!(PayloadType, 52);
|
||||||
|
assert_size!(Parameter, 24);
|
||||||
|
}
|
||||||
|
|
||||||
|
#[cfg(target_pointer_width = "64")]
|
||||||
|
#[test]
|
||||||
|
fn test_size() {
|
||||||
|
assert_size!(Description, 72);
|
||||||
|
assert_size!(Channels, 1);
|
||||||
|
assert_size!(PayloadType, 80);
|
||||||
|
assert_size!(Parameter, 48);
|
||||||
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_simple() {
|
fn test_simple() {
|
||||||
let elem: Element = "
|
let elem: Element = "
|
||||||
|
|
Loading…
Reference in a new issue