Groonga 3.0.9 Source Code Document
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Macros | Functions
test-string.c File Reference
#include <groonga_in.h>
#include <groonga.h>
#include <stdlib.h>
#include <str.h>
#include <gcutter.h>
#include <glib/gstdio.h>
#include "../lib/grn-assertions.h"
Include dependency graph for test-string.c:

Go to the source code of this file.

Macros

#define ADD_DATUM_WITH_ENCODING(label, expected, input, encoding)
#define ADD_DATUM_JAPANESE(label, expected, input)
#define ADD_DATUM_JAPANESE_NO_SJIS(label, expected, input)
#define ADD_DATUM_JAPANESE_UTF_8(label, expected, input)
#define ADD_DATUM(label, input, input_encoding, input_length,context_encoding)
#define ADD_DATUM_JAPANESE_NON_UTF8(label, input, input_length)
#define ADD_DATUM(label, expected, input, flags)
#define UFFFE_IN_UTF8   "\xef\xbf\xbe"
#define ADD_DATUM_WITH_ENCODING(label, input, input_length, encoding)
#define ADD_DATUM(label, input, input_length)
#define ADD_DATUM_JAPANESE(label, input, input_length)
#define ADD_DATUM(label, expected, input, input_length)
#define ADD_DATUM(label, expected, input, input_length, end_char)
#define ADD_DATUM(label, expected, input, input_length, delimiter)
#define ADD_DATUM(label, expected, input)
#define BUFFER_SIZE   1024
#define ADD_DATUM(label, error_message, input)
#define BUFFER_SIZE   1024
#define ADD_DATUM(label, expected, type,...)
#define ADD_DATUM(label, expected, input, encoding)
#define ADD_DATUM_ALL_ENCODING(label, expected, input)
#define ADD_DATUM_JAPANESE(label, expected, input)
#define ADD_DATUM(label, grn_type, g_type, expected, input)
#define ADD_DATUM(label, expected, input, length)

Functions

void data_normalize (void)
void test_normalize (gconstpointer data)
void data_normalize_broken (void)
void test_normalize_broken (gconstpointer data)
void data_remove_tokenized_delimiter (void)
void test_remove_tokenized_delimiter (gconstpointer data)
void data_charlen_broken (void)
void test_charlen_broken (gconstpointer data)
void data_urlenc (void)
void test_urlenc (gconstpointer data)
void data_urldec (void)
void test_urldec (gconstpointer data)
void data_cgidec (void)
void test_cgidec (gconstpointer data)
void data_url_path_normalize (void)
void test_url_path_normalize (gconstpointer data)
void data_url_path_normalize_invalid (void)
void test_url_path_normalize_invalid (gconstpointer data)
void data_text_otoj (void)
void test_text_otoj (gconstpointer data)
void data_str_len (void)
void test_str_len (gconstpointer data)
void data_aton (void)
void test_aton (gconstpointer data)
void data_itoh (void)
void test_itoh (gconstpointer data)
void setup (void)
void teardown (void)

Macro Definition Documentation

#define ADD_DATUM (   label,
  input,
  input_encoding,
  input_length,
  context_encoding 
)
Value:
gcut_add_datum(label, \
"input", G_TYPE_STRING, input, \
"input-encoding", G_TYPE_INT, input_encoding, \
"input-length", G_TYPE_INT, input_length, \
"context-encoding", G_TYPE_INT, context_encoding, \
NULL)
#define ADD_DATUM (   label,
  expected,
  input,
  flags 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_STRING, input, \
"flags", G_TYPE_INT, flags, \
NULL)
#define ADD_DATUM (   label,
  input,
  input_length 
)
Value:
ADD_DATUM_WITH_ENCODING("(None): " label " <" input ">", \
input, input_length, GRN_ENC_NONE); \
ADD_DATUM_WITH_ENCODING("(UTF-8): " label " <" input ">", \
input, input_length, GRN_ENC_UTF8); \
ADD_DATUM_WITH_ENCODING("(eucJP): " label " <" input ">", \
input, input_length, GRN_ENC_EUC_JP); \
ADD_DATUM_WITH_ENCODING("(Shift_JIS): " label " <" input ">", \
input, input_length, GRN_ENC_SJIS); \
ADD_DATUM_WITH_ENCODING("(Latin1): " label " <" input ">", \
input, input_length, GRN_ENC_LATIN1); \
ADD_DATUM_WITH_ENCODING("(KOI8R): " label " <" input ">", \
input, input_length, GRN_ENC_KOI8R)
#define ADD_DATUM (   label,
  expected,
  input,
  input_length 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_STRING, input, \
"input-length", G_TYPE_INT, input_length, \
NULL)
#define ADD_DATUM (   label,
  expected,
  input,
  input_length,
  end_char 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_STRING, input, \
"input-length", G_TYPE_INT, input_length, \
"end-char", G_TYPE_CHAR, end_char, \
NULL)
#define ADD_DATUM (   label,
  expected,
  input,
  input_length,
  delimiter 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_STRING, input, \
"input-length", G_TYPE_INT, input_length, \
"delimiter", G_TYPE_STRING, delimiter, \
NULL)
#define ADD_DATUM (   label,
  expected,
  input 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_STRING, input, \
NULL)
#define ADD_DATUM (   label,
  error_message,
  input 
)
Value:
gcut_add_datum(label, \
"error-message", G_TYPE_STRING, error_message, \
"input", G_TYPE_STRING, input, \
NULL)
#define ADD_DATUM (   label,
  expected,
  type,
  ... 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"type", G_TYPE_INT, type, \
__VA_ARGS__);
#define ADD_DATUM (   label,
  expected,
  input,
  encoding 
)
Value:
gcut_add_datum(label, \
"expected", GCUT_TYPE_SIZE, expected, \
"input", G_TYPE_STRING, input, \
"encoding", G_TYPE_INT, encoding, \
NULL)
#define ADD_DATUM (   label,
  grn_type,
  g_type,
  expected,
  input 
)
Value:
gcut_add_datum(label " - " #expected, \
"type", G_TYPE_INT, grn_type, \
"expected", g_type, expected, \
"input", G_TYPE_STRING, input, \
NULL)
#define ADD_DATUM (   label,
  expected,
  input,
  length 
)
Value:
gcut_add_datum(label " - " #input " [" #length "] (" expected ")", \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_UINT, input, \
"length", G_TYPE_UINT, length, \
NULL)
#define ADD_DATUM_ALL_ENCODING (   label,
  expected,
  input 
)
Value:
ADD_DATUM(label " (none) <" input ">", \
expected, input, GRN_ENC_NONE); \
ADD_DATUM(label " (EUC-JP) <" input ">", \
expected, input, GRN_ENC_EUC_JP); \
ADD_DATUM(label " (UTF-8) <" input ">", \
expected, input, GRN_ENC_UTF8); \
ADD_DATUM(label " (Shift_JIS) <" input ">", \
expected, input, GRN_ENC_SJIS); \
ADD_DATUM(label " (Latin1) <" input ">", \
expected, input, GRN_ENC_LATIN1); \
ADD_DATUM(label " (KOI8R) <" input ">", \
expected, input, GRN_ENC_KOI8R);
#define ADD_DATUM_JAPANESE (   label,
  expected,
  input 
)
Value:
ADD_DATUM_WITH_ENCODING("Japanese (UTF-8): " label " <" input ">", \
expected, input, GRN_ENC_UTF8); \
ADD_DATUM_WITH_ENCODING("Japanese (eucJP): " label " <" input ">", \
expected, input, GRN_ENC_EUC_JP); \
ADD_DATUM_WITH_ENCODING("Japanese (Shift_JIS): " label " <" input ">",\
expected, input, GRN_ENC_SJIS)
#define ADD_DATUM_JAPANESE (   label,
  input,
  input_length 
)
Value:
ADD_DATUM_WITH_ENCODING("Japanese (UTF-8): " label " <" input ">", \
input, input_length, GRN_ENC_UTF8); \
ADD_DATUM_WITH_ENCODING("Japanese (eucJP): " label " <" input ">", \
input, input_length, GRN_ENC_EUC_JP); \
ADD_DATUM_WITH_ENCODING("Japanese (Shift_JIS): " label " <" input ">",\
input, input_length, GRN_ENC_SJIS)
#define ADD_DATUM_JAPANESE (   label,
  expected,
  input 
)
Value:
ADD_DATUM("Japanese: " label " (EUC-JP) <" input ">", \
expected, cut_take_convert(input, "eucJP", "UTF-8"), \
ADD_DATUM("Japanese: " label " (UTF-8) <" input ">", \
expected, input, GRN_ENC_UTF8); \
ADD_DATUM("Japanese: " label " (Shift_JIS) <" input ">", \
expected, cut_take_convert(input, "CP932", "UTF-8"), \
#define ADD_DATUM_JAPANESE_NO_SJIS (   label,
  expected,
  input 
)
Value:
ADD_DATUM_WITH_ENCODING("Japanese (UTF-8): " label " <" input ">",\
expected, input, GRN_ENC_UTF8); \
ADD_DATUM_WITH_ENCODING("Japanese (eucJP): " label " <" input ">", \
expected, input, GRN_ENC_EUC_JP)
#define ADD_DATUM_JAPANESE_NON_UTF8 (   label,
  input,
  input_length 
)
Value:
ADD_DATUM("eucJP with UTF-8 context: " label " <" input ">", \
input, GRN_ENC_EUC_JP, input_length, GRN_ENC_UTF8); \
ADD_DATUM("ShiftJIS with UTF-8 context : " label " <" input ">", \
input, GRN_ENC_SJIS, input_length, GRN_ENC_UTF8);
#define ADD_DATUM_JAPANESE_UTF_8 (   label,
  expected,
  input 
)
Value:
ADD_DATUM_WITH_ENCODING("Japanese (UTF-8): " label " <" input ">", \
expected, input, GRN_ENC_UTF8)
#define ADD_DATUM_WITH_ENCODING (   label,
  expected,
  input,
  encoding 
)
Value:
gcut_add_datum(label, \
"expected", G_TYPE_STRING, expected, \
"input", G_TYPE_STRING, input, \
"encoding", G_TYPE_INT, encoding, \
NULL)
#define ADD_DATUM_WITH_ENCODING (   label,
  input,
  input_length,
  encoding 
)
Value:
gcut_add_datum(label, \
"input", G_TYPE_STRING, input, \
"input-length", G_TYPE_INT, input_length, \
"encoding", G_TYPE_INT, encoding, \
NULL)
#define BUFFER_SIZE   1024
#define BUFFER_SIZE   1024
#define UFFFE_IN_UTF8   "\xef\xbf\xbe"

Function Documentation

void data_aton ( void  )

Definition at line 894 of file test-string.c.

void data_cgidec ( void  )

Definition at line 504 of file test-string.c.

void data_charlen_broken ( void  )

Definition at line 352 of file test-string.c.

void data_itoh ( void  )

Definition at line 980 of file test-string.c.

void data_normalize ( void  )
void data_normalize_broken ( void  )

Definition at line 226 of file test-string.c.

void data_remove_tokenized_delimiter ( void  )

Definition at line 289 of file test-string.c.

void data_str_len ( void  )

Definition at line 825 of file test-string.c.

void data_text_otoj ( void  )

Definition at line 620 of file test-string.c.

void data_url_path_normalize ( void  )

Definition at line 553 of file test-string.c.

void data_url_path_normalize_invalid ( void  )

Definition at line 588 of file test-string.c.

void data_urldec ( void  )

Definition at line 458 of file test-string.c.

void data_urlenc ( void  )

Definition at line 415 of file test-string.c.

void setup ( void  )

Definition at line 78 of file test-string.c.

Here is the call graph for this function:

void teardown ( void  )

Definition at line 86 of file test-string.c.

Here is the call graph for this function:

void test_aton ( gconstpointer  data)

Definition at line 938 of file test-string.c.

Here is the call graph for this function:

void test_cgidec ( gconstpointer  data)

Definition at line 528 of file test-string.c.

Here is the call graph for this function:

void test_charlen_broken ( gconstpointer  data)

Definition at line 393 of file test-string.c.

Here is the call graph for this function:

void test_itoh ( gconstpointer  data)

Definition at line 1000 of file test-string.c.

Here is the call graph for this function:

void test_normalize ( gconstpointer  data)
void test_normalize_broken ( gconstpointer  data)

Definition at line 254 of file test-string.c.

Here is the call graph for this function:

void test_remove_tokenized_delimiter ( gconstpointer  data)

Definition at line 323 of file test-string.c.

Here is the call graph for this function:

void test_str_len ( gconstpointer  data)

Definition at line 878 of file test-string.c.

Here is the call graph for this function:

void test_text_otoj ( gconstpointer  data)

Definition at line 805 of file test-string.c.

Here is the call graph for this function:

void test_url_path_normalize ( gconstpointer  data)

Definition at line 572 of file test-string.c.

Here is the call graph for this function:

void test_url_path_normalize_invalid ( gconstpointer  data)

Definition at line 604 of file test-string.c.

Here is the call graph for this function:

void test_urldec ( gconstpointer  data)

Definition at line 479 of file test-string.c.

Here is the call graph for this function:

void test_urlenc ( gconstpointer  data)

Definition at line 435 of file test-string.c.

Here is the call graph for this function: