Add some negative tests to ensure a `return true` (exaggerated)
refactoring won't pass the suite, and add one test where a and b is
the same, just to be sure.
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
#[test]
fn fqdn_compare() {
+ assert_eq!(Fqdn::from("example.com"), Fqdn::from("example.com"));
assert_eq!(Fqdn::from("example.com"), Fqdn::from("ExAmPle.Com"));
assert_eq!(Fqdn::from("ExAmPle.Com"), Fqdn::from("example.com"));
+ assert_ne!(Fqdn::from("subdomain.ExAmPle.Com"), Fqdn::from("example.com"));
+ assert_ne!(Fqdn::from("foo.com"), Fqdn::from("bar.com"));
+ assert_ne!(Fqdn::from("example.com"), Fqdn::from("example.net"));
}
}