libtld: /home/snapwebsites/snapcpp/contrib/libtld/tests/tld_test_tld_names.cpp File Reference

libtld  1.5.13
A library to determine the Top-Level Domain name of any URL.
tld_test_tld_names.cpp File Reference

Test the tld_domain_to_lowercase() function. More...

#include "libtld/tld.h"
#include <string>
#include <vector>
#include <stdlib.h>
#include <stdio.h>
#include <boost/algorithm/string.hpp>
#include <QtCore/QString>
Include dependency graph for tld_test_tld_names.cpp:

Go to the source code of this file.


struct  tld_t


typedef std::vector< tld_tstring_vector_t


int main (int argc, char *argv[])
void test_load ()
void test_tlds ()
QString tld_encode (const QString &tld, int &level)
 Encode a URL. More...


int err_count = 0
string_vector_t tlds
int verbose = 0

Detailed Description

This file implements various test to verify that the tld() function works as expected with valid and invalid names.

Definition in file tld_test_tld_names.cpp.

Function Documentation

QString tld_encode ( const QString &  tld,
int &  level 

This function transforms the characters in a valid URI string.

Definition at line 68 of file tld_test_tld_names.cpp.

References err_count, tld_info::f_tld, main(), tld(), TLD_RESULT_INVALID, TLD_RESULT_SUCCESS, tld_version(), and verbose.

This document is part of the Snap! Websites Project.

Copyright by Made to Order Software Corp.

Syndicate content

Snap! Websites
An Open Source CMS System in C++

Contact Us Directly