t_amorph.cpp File Reference

#include "bogon.cpp"
#include <basis/chaos.h>
#include <basis/function.h>
#include <basis/guards.h>
#include <data_struct/amorph.cpp>
#include <mechanisms/time_stamp.h>
#include <loggers/file_logger.h>
#include <data_struct/static_memory_gremlin.h>
#include <memory.h>
#include <stdlib.h>

Include dependency graph for t_amorph.cpp:

Go to the source code of this file.

Defines

#define DEBUG_ARRAY
#define DEBUG_AMORPH
#define LOG(to_print)   {}
#define static_class_name()   "t_amorph"
#define PROGRAM_NAME   "test_amorph"
#define PACK_BLOB_SIZE(max_limbs)   (max_limbs * sizeof(blob_hold))

Functions

int compare (amorph< byte_array > &one, amorph< byte_array > &two)
byte_array fake_pack (amorph< byte_array > &me)
amorph< byte_array > * fake_amorph_unpack (byte_array &packed_amorph)
void test_byte_array_amorph ()
int compare (const amorph< bogon > &one, const amorph< bogon > &two)
void test_bogon_amorph ()
template<class contents>
void test_amorph_of (const contents &bogus)
int main (int formal(argc), char *formal(argv)[])

Variables

 HOOPLE_STARTUP_CODE
const int default_test_iterations = 28
const int MAX_LIMBS = 200
const int MIN_CHUBBY = 60
const int MAX_RANDO = 275
const int MAX_TEST_DURATION = 1 * MINUTE_ms
const int MAX_SIMULTANEOUS_OBJECTS = 42


Define Documentation

#define DEBUG_AMORPH

Definition at line 22 of file t_amorph.cpp.

#define DEBUG_ARRAY

Definition at line 19 of file t_amorph.cpp.

#define LOG ( to_print   )     {}

Definition at line 31 of file t_amorph.cpp.

#define PACK_BLOB_SIZE ( max_limbs   )     (max_limbs * sizeof(blob_hold))

Definition at line 101 of file t_amorph.cpp.

Referenced by fake_amorph_unpack(), and fake_pack().

#define PROGRAM_NAME   "test_amorph"

Definition at line 65 of file t_amorph.cpp.

Referenced by compare().

 
#define static_class_name (  )     "t_amorph"

Definition at line 52 of file t_amorph.cpp.


Function Documentation

int compare ( const amorph< bogon > &  one,
const amorph< bogon > &  two 
)

Definition at line 330 of file t_amorph.cpp.

References continuable_error, amorph< contents >::elements(), FUNCDEF, amorph< contents >::get(), PROGRAM_NAME, and istring::SPRINTF.

int compare ( amorph< byte_array > &  one,
amorph< byte_array > &  two 
)

Definition at line 67 of file t_amorph.cpp.

References continuable_error, amorph< contents >::elements(), FUNCDEF, amorph< contents >::get(), array< contents >::length(), LOG, PROGRAM_NAME, istring::SPRINTF, and amorph< contents >::valid_fields().

Referenced by nodes::ordered_list::find(), nodes::ordered_list::insert(), file_time::operator!=(), file_time::operator<(), file_time::operator<=(), file_time::operator==(), string_set::operator==(), file_time::operator>(), file_time::operator>=(), test_bogon_amorph(), and test_byte_array_amorph().

amorph<byte_array>* fake_amorph_unpack ( byte_array packed_amorph  ) 

Definition at line 151 of file t_amorph.cpp.

References array< contents >::access(), basis::detach(), memory_assign(), object_assign(), and PACK_BLOB_SIZE.

Referenced by test_byte_array_amorph().

byte_array fake_pack ( amorph< byte_array > &  me  ) 

Definition at line 103 of file t_amorph.cpp.

References basis::attach(), deadly_error, amorph< contents >::elements(), amorph< contents >::get(), array< contents >::length(), memory_assign(), object_assign(), PACK_BLOB_SIZE, and static_class_name.

Referenced by test_byte_array_amorph().

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

Definition at line 528 of file t_amorph.cpp.

References guards::alert_message(), SET_DEFAULT_COMBO_LOGGER, test_bogon_amorph(), and test_byte_array_amorph().

template<class contents>
void test_amorph_of ( const contents &  bogus  ) 

Definition at line 491 of file t_amorph.cpp.

References chaos::inclusive(), MAX_SIMULTANEOUS_OBJECTS, MAX_TEST_DURATION, and rando.

void test_bogon_amorph (  ) 

Definition at line 356 of file t_amorph.cpp.

References amorph< contents >::adjust(), amorph_assign(), bogon(), amorph< contents >::clear(), amorph< contents >::clear_all(), compare(), deadly_error, default_test_iterations, amorph< contents >::elements(), FUNCDEF, chaos::inclusive(), istring::length(), LOG, MAX_LIMBS, MAX_RANDO, MIN_CHUBBY, amorph< contents >::put(), istring::s(), istring::SPRINTF, static_class_name, istring::stuff(), and amorph< contents >::zap().

Referenced by main().

void test_byte_array_amorph (  ) 

Definition at line 173 of file t_amorph.cpp.

References array< contents >::access(), istring::access(), amorph< contents >::adjust(), amorph_assign(), amorph< contents >::append(), amorph< contents >::clear(), amorph< contents >::clear_all(), compare(), deadly_error, default_test_iterations, amorph< contents >::elements(), fake_amorph_unpack(), fake_pack(), FUNCDEF, amorph< contents >::get(), chaos::inclusive(), array< contents >::length(), istring::length(), LOG, MAX_LIMBS, MAX_RANDO, memory_assign(), MIN_CHUBBY, NIL, istring::observe(), amorph< contents >::put(), istring::s(), istring::SPRINTF, static_class_name, istring::stuff(), and amorph< contents >::zap().

Referenced by main().


Variable Documentation

const int default_test_iterations = 28

Definition at line 54 of file t_amorph.cpp.

Referenced by test_bogon_amorph(), and test_byte_array_amorph().

HOOPLE_STARTUP_CODE

Definition at line 50 of file t_amorph.cpp.

const int MAX_LIMBS = 200

Definition at line 56 of file t_amorph.cpp.

Referenced by test_bogon_amorph(), and test_byte_array_amorph().

const int MAX_RANDO = 275

Definition at line 62 of file t_amorph.cpp.

Referenced by test_bogon_amorph(), and test_byte_array_amorph().

const int MAX_SIMULTANEOUS_OBJECTS = 42

Definition at line 486 of file t_amorph.cpp.

const int MAX_TEST_DURATION = 1 * MINUTE_ms

Definition at line 483 of file t_amorph.cpp.

const int MIN_CHUBBY = 60

Definition at line 59 of file t_amorph.cpp.

Referenced by test_bogon_amorph(), and test_byte_array_amorph().


Generated on Fri Aug 29 04:30:04 2008 for HOOPLE Libraries by  doxygen 1.5.1