lay it out a bit better
[ghsmtp.git] / TLD-test.cpp
blob34ea02c4af37ed2b868a47fa027349036ff615c3
1 #include "TLD.hpp"
3 #include <iostream>
5 int main(int argc, char const* argv[])
7 TLD tld;
9 CHECK_NOTNULL(tld.get_registered_domain("digilicious.com"));
10 CHECK_NOTNULL(tld.get_registered_domain("yahoo.com"));
11 CHECK_NOTNULL(tld.get_registered_domain("google.com"));
13 CHECK(!strcmp(tld.get_registered_domain("pi.digilicious.com"),
14 "digilicious.com"));
16 CHECK(!strcmp(tld.get_registered_domain("outmail14.phi.meetup.com"),
17 "meetup.com"));
19 CHECK(nullptr == tld.get_registered_domain("not_a_domain_at_all"));
20 CHECK(nullptr == tld.get_registered_domain(".com"));
21 CHECK(nullptr == tld.get_registered_domain("."));
23 CHECK(!strcmp(tld.get_registered_domain("reward.yournewestbonuspoints.com"),
24 "yournewestbonuspoints.com"));