Functions | Variables

datahash/test/test1.cpp File Reference

#include "datahash/datahash.h"
#include <fstream>
#include "common/wave_ex.h"
#include "datahash/datahash_text.h"
#include "datahash/datahash_util.h"
#include "perf/perf.h"
Include dependency graph for datahash/test/test1.cpp:

Go to the source code of this file.

Functions

static void addSubhash (IN Datahash *h, IN const char *key)
static void addToSubhash (IN Datahash *h, IN const char *hashname, IN const char *key, IN const char *value)
static void verifyBadAdd (IN Datahash *h, IN const char *key, IN const char *value)
static void writeHash (IN const Datahash *hash)
static void verifySubhash (IN const Datahash *h, IN const char *name)
static void verifySubhashValue (IN const Datahash *h, IN const char *name, IN const char *key, IN const char *value)
static void verifyMissing (IN const Datahash *h, IN const char *key)
static void doTest (void)
int main (IN int argc, IN const char *argv[])

Variables

static const char * s_filename = "testhash-1.txt"
static const key_value_t s_funkyLines []

Function Documentation

static void addSubhash ( IN Datahash h,
IN const char *  key 
) [static]

Definition at line 76 of file datahash/test/test1.cpp.

static void addToSubhash ( IN Datahash h,
IN const char *  hashname,
IN const char *  key,
IN const char *  value 
) [static]

Definition at line 94 of file datahash/test/test1.cpp.

static void verifyBadAdd ( IN Datahash h,
IN const char *  key,
IN const char *  value 
) [static]

Definition at line 118 of file datahash/test/test1.cpp.

static void writeHash ( IN const Datahash hash  )  [static]

Definition at line 148 of file datahash/test/test1.cpp.

static void verifySubhash ( IN const Datahash h,
IN const char *  name 
) [static]

Definition at line 167 of file datahash/test/test1.cpp.

static void verifySubhashValue ( IN const Datahash h,
IN const char *  name,
IN const char *  key,
IN const char *  value 
) [static]

Definition at line 183 of file datahash/test/test1.cpp.

static void verifyMissing ( IN const Datahash h,
IN const char *  key 
) [static]

Definition at line 220 of file datahash/test/test1.cpp.

static void doTest ( void   )  [static]

Definition at line 247 of file datahash/test/test1.cpp.

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

Definition at line 316 of file datahash/test/test1.cpp.


Variable Documentation

const char* s_filename = "testhash-1.txt" [static]

Definition at line 46 of file datahash/test/test1.cpp.

const key_value_t s_funkyLines[] [static]
Initial value:
 {
    { "funky",          "This is a funky line! [] @/^\\$() _~`<>,. { } | += --- \t yup!" },
    { "greek",          "Μπορῶ νὰ φάω σπασμένα γυαλιὰ χωρὶς νὰ πάθω τίποτα." },
    { "frenchProvencal","Pòdi manjar de veire, me nafrariá pas." },
    { "georgian",       "მინას ვჭამ და არა მტკივა." },
    { "macedonian",     "Можам да јадам стакло, а не ме штета." },
    { "japanese",       "私はガラスを食べられます。それは私を傷つけません。" },
    { "chinese",        "我能吞下玻璃而不伤身体。" },

    
    { NULL, NULL }
}

Definition at line 54 of file datahash/test/test1.cpp.