QOF  0.7.5
test-engine-stuff.c File Reference

tools to set up random test data. More...

#include <sys/types.h>
#include <dirent.h>
#include <fcntl.h>
#include <glib.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include "config.h"
#include "qof.h"
#include "test-engine-stuff.h"
#include "test-stuff.h"

Go to the source code of this file.

Macros

#define RAND_IN_RANGE(X)   (((X)*((gint64) (rand()+1)))/RAND_MAX)
 

Enumerations

enum  sort_type_t {
  BY_STANDARD = 1, BY_DATE, BY_DATE_ENTERED, BY_DATE_RECONCILED,
  BY_NUM, BY_AMOUNT, BY_MEMO, BY_DESC,
  BY_NONE
}
 

Functions

void set_max_kvp_depth (gint max_kvp_depth)
 
void set_max_kvp_frame_elements (gint max_kvp_frame_elements)
 
void kvp_exclude_type (KvpValueType kvp_type)
 
static gboolean kvp_type_excluded (KvpValueType kvp_type)
 
void random_glist_strings_only (gboolean strings_only)
 
void random_timespec_zero_nsec (gboolean zero_nsec_in)
 
void random_timespec_usec_resolution (gboolean usec_resolution_in)
 
static gboolean do_bork (void)
 
static KvpValueget_random_kvp_value_depth (int type, gint depth)
 
static GList * get_random_glist_depth (gint depth)
 
GList * get_random_glist (void)
 
Timespecget_random_timespec (void)
 
GUIDget_random_guid (void)
 
bin_dataget_random_binary_data (void)
 
static KvpFrameget_random_kvp_frame_depth (gint depth)
 
KvpFrameget_random_kvp_frame (void)
 
KvpValueget_random_kvp_value (int type)
 
QofNumeric get_random_qof_numeric (void)
 
TestQueryTypes get_random_query_type (void)
 

Variables

static gboolean glist_strings_only = FALSE
 
static GHashTable * exclude_kvp_types = NULL
 
static gint kvp_max_depth = 5
 
static gint kvp_frame_max_elements = 10
 
gboolean gnc_engine_debug_random = FALSE
 
static gboolean zero_nsec = FALSE
 
static gboolean usec_resolution = FALSE
 
static gint borked = 80
 

Detailed Description

tools to set up random test data.

Created by Linux Developers Group, 2001 Updates Linas Vepstas July 2004

Definition in file test-engine-stuff.c.