libtld 1.2.0

tld_test.c File Reference

#include "tld.h"
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include "tld_data.h"
Include dependency graph for tld_test.c:

Go to the source code of this file.

Functions

void cat_ext (int offset, char *uri)
 Build an extension from any offset.
int main (int argc, char *argv[])
void test_all ()
void test_invalid ()
void test_unknown ()

Variables

int err_count = 0
struct tld_description tld_descriptions []
unsigned short tld_end_offset
unsigned short tld_start_offset

Function Documentation

void cat_ext ( int  offset,
char *  uri 
)

Create a domain name extensions from any entry in the TLD descriptions.

Parameters:
[in]offsetThe offset in the tld_descriptions table
[in]uriThe URI buffer

Definition at line 53 of file tld_test.c.

References tld_description::f_end_offset, tld_description::f_start_offset, tld_description::f_tld, tld_descriptions, and tld_end_offset.

Referenced by test_all().

int main ( int  argc,
char *  argv[] 
)

Definition at line 333 of file tld_test.c.

References err_count, test_all(), test_invalid(), test_unknown(), and tld_version().

void test_unknown ( )

Definition at line 206 of file tld_test.c.

References err_count, tld(), and TLD_RESULT_NOT_FOUND.

Referenced by main().


Variable Documentation

int err_count = 0

Definition at line 34 of file tld_test.c.

unsigned short tld_end_offset
unsigned short tld_start_offset
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines

This document is part of the libtld Project.

Copyright by Made to Order Software Corp.