test_internals.h File Reference
#include "bu/bitv.h"
#include "bu/log.h"
#include "bu/vls.h"
Include dependency graph for test_internals.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.


#define FALSE   0
#define TRUE   1


enum  hex_bin_enum_t { HEX = 0x0001, HEX_RAW = 0x0011, BINARY = 0x0100, BINARY_RAW = 0x1100 }


BU_TESTS_EXPORT void dump_bitv (const struct bu_bitv *)
BU_TESTS_EXPORT long int bu_get_urandom_number ()
BU_TESTS_EXPORT void random_hex_or_binary_string (struct bu_vls *v, const hex_bin_enum_t typ, const int nbytes)


const int CTEST_PASS = 0
const int CTEST_FAIL = 1

Macro Definition Documentation


Definition at line 38 of file test_internals.h.

#define FALSE   0

Enumeration Type Documentation


Definition at line 56 of file test_internals.h.

Function Documentation

BU_TESTS_EXPORT void dump_bitv ( const struct bu_bitv )

Dump a bitv into a detailed bit format for debugging.

Definition at line 60 of file test_funcs.c.

References bu_bitv::bits, BITS_PER_BYTE, bu_log(), bu_vls_cstr(), bu_vls_free(), bu_vls_printf(), bu_vls_vlsinit(), bu_bitv::nbits, and OSL::Strings::v.

Here is the call graph for this function:

BU_TESTS_EXPORT long int bu_get_urandom_number ( )

Get a random number from system entropy (typically used for seeding the 'random' function).

Definition at line 43 of file test_funcs.c.

References bu_exit(), and bu_log().

Referenced by random_hex_or_binary_string().

Here is the call graph for this function:

BU_TESTS_EXPORT void random_hex_or_binary_string ( struct bu_vls v,
const hex_bin_enum_t  typ,
const int  nbytes 

Get a random string of hex or binary characters (possibly with a leading '0x' or '0b').

Definition at line 151 of file test_funcs.c.

References BINARY, BITS_PER_BYTE, bu_get_urandom_number(), bu_vls_extend(), bu_vls_prepend(), bu_vls_putc(), bu_vls_trunc(), HEX, and HEXCHARS_PER_BYTE.

Here is the call graph for this function:

Variable Documentation

const int CTEST_PASS = 0

Definition at line 46 of file test_internals.h.

Referenced by check_format_chars(), and test_vls().

const int CTEST_FAIL = 1

Definition at line 47 of file test_internals.h.

Referenced by check_format_chars(), main(), and test_vls().