@@ -172,6 +172,7 @@ dependencies = [
"byteorder",
"log",
"mutagen",
+ "pretty_assertions",
]
[[package]]
@@ -16,6 +16,8 @@ byteorder = "1.3"
# testing
mutagen = { git = "https://github.com/llogiq/mutagen", optional = true }
+[dev-dependencies]
+pretty_assertions = "0.6"
[features]
with_mutagen = ["mutagen"] # needs nightly
@@ -44,6 +44,7 @@ impl Wire for A {
#[cfg(test)]
mod test {
use super::*;
+ use pretty_assertions::assert_eq;
#[test]
fn parses() {
@@ -46,6 +46,7 @@ impl Wire for AAAA {
@@ -74,6 +74,7 @@ impl Wire for CAA {
fn parses_non_critical() {
@@ -40,6 +40,7 @@ impl Wire for CNAME {
@@ -67,6 +67,7 @@ impl Wire for HINFO {
@@ -49,6 +49,7 @@ impl Wire for MX {
@@ -41,6 +41,7 @@ impl Wire for NS {
@@ -116,6 +116,7 @@ impl OPT {
fn parses_no_data() {
@@ -46,6 +46,7 @@ impl Wire for PTR {
@@ -88,6 +88,7 @@ impl Wire for SOA {
@@ -62,6 +62,7 @@ impl Wire for SRV {
@@ -64,6 +64,7 @@ impl Wire for TXT {
fn parses_one_iteration() {
@@ -180,6 +180,7 @@ fn read_string_recursive(labels: &mut Labels, c: &mut Cursor<&[u8]>, recursions:
// The buffers used in these tests contain nothing but the labels we’re
// decoding. In DNS packets found in the wild, the cursor will be able to
@@ -452,6 +452,7 @@ mod test {
use crate::record::{Record, A, SOA, OPT, UnknownQtype};
use std::net::Ipv4Addr;
fn complete_response() {