38 using namespace basis;
47 #define LOG(s) CLASS_EMERGENCY_LOG(program_wide_logger::get(), astring(s))
48 #define BASE_LOG(s) EMERGENCY_LOG(program_wide_logger::get(), astring(s))
60 int test_bin::execute()
69 enum test_types { ANY = 1, ENT, ID };
71 for (
int q = ANY; q <= ID; q++) {
77 program_wide_logger::get().eol(parser_bits::NO_ENDING);
85 process_id, sequencer, add_in);
96 program_wide_logger::get().eol(parser_bits::CRLF_AT_END);
101 program_wide_logger::get().eol(parser_bits::NO_ENDING);
103 while (item_list.
length()) {
110 if (! (items_seen % 50) ) {
115 for (
int q = 0; q < item_list.
length(); q++) {
116 if (item_list[q] ==
id) {
123 deadly_error(class_name(),
"ANY",
"didn't see id for the item");
125 }
else if (q == ENT) {
126 while (item_list.
length()) {
133 if (! (items_seen % 50) ) {
138 for (
int q = 0; q < item_list.
length(); q++) {
139 if (item_list[q] ==
id) {
146 deadly_error(class_name(),
"ENT",
"didn't see id for the item");
148 }
else if (q == ID) {
149 for (
int j = 0; j < item_list.
length(); j++) {
155 if (! (items_seen % 50) ) {
163 deadly_error(class_name(),
"looping",
"bad enum value");
165 program_wide_logger::get().eol(parser_bits::CRLF_AT_END);
171 deadly_error(class_name(),
"check left",
"there are still contents in table!");
181 LOG(
"done testing, zapped bin, now should be low memory.");
184 LOG(
"octopus_entity:: works for those functions tested.");
The application_shell is a base object for console programs.
a_sprintf is a specialization of astring that provides printf style support.
Represents a sequential, ordered, contiguous collection of objects.
void reset(int number=0, const contents *initial_contents=NULL_POINTER)
Resizes this array and sets the contents from an array of contents.
outcome shrink()
Cuts loose any allocated space that is beyond the real length.
int length() const
Returns the current reported length of the allocated C array.
outcome zap(int start, int end)
Deletes from "this" the objects inclusively between "start" and "end".
Stores a set of infotons grouped by the entity that owns them.
bool add_item(infoton *to_add, const octopus_request_id &id)
infoton * acquire_for_any(octopus_request_id &id)
infoton * acquire_for_identifier(const octopus_request_id &id)
void clean_out_deadwood(int decay_interval=4 *basis::MINUTE_ms)
infoton * acquire_for_entity(const octopus_entity &requester, octopus_request_id &id)
An infoton is an individual request parcel with accompanying information.
Provides a way of identifying users of an octopus object.
Identifies requests made on an octopus by users.
int _request_num
the item number from the entity.
octopus_entity _entity
the entity.
Encapsulates security activities (login, logout, refresh).
#define deadly_error(c, f, i)
#define NULL_POINTER
The value representing a pointer to nothing.
#define MAXINT32
Maximum 32-bit integer value.
#define DEFINE_CLASS_NAME(objname)
Defines the name of a class by providing a couple standard methods.
#define FUNCDEF(func_in)
FUNCDEF sets the name of a function (and plugs it into the callstack).
Provides macros that implement the 'main' program of an application.
#define HOOPLE_MAIN(obj_name, obj_args)
options that should work for most unix and linux apps.
Implements an application lock to ensure only one is running at once.
The guards collection helps in testing preconditions and reporting errors.
void WHACK(contents *&ptr)
deletion with clearing of the pointer.
const int MEGABYTE
Number of bytes in a megabyte.
A logger that sends to the console screen using the standard output device.
Useful support functions for unit testing, especially within hoople.