feisty meow concerns codebase
2.140
test_system_values.cpp
Go to the documentation of this file.
1
/*****************************************************************************\
2
* *
3
* Name : test_system_values *
4
* Author : Chris Koeritz *
5
* *
6
*******************************************************************************
7
* Copyright (c) 2005-$now By Author. This program is free software; you can *
8
* redistribute it and/or modify it under the terms of the GNU General Public *
9
* License as published by the Free Software Foundation; either version 2 of *
10
* the License or (at your option) any later version. This is online at: *
11
* http://www.fsf.org/copyleft/gpl.html *
12
* Please send any updates to: fred@gruntose.com *
13
\*****************************************************************************/
14
15
#include <
basis/functions.h
>
16
#include <
basis/guards.h
>
17
#include <
basis/astring.h
>
18
19
#include <
application/application_shell.h
>
20
#include <
application/hoople_main.h
>
21
#include <
loggers/console_logger.h
>
22
#include <
structures/static_memory_gremlin.h
>
23
#include <
configuration/system_values.h
>
24
#include <
unit_test/unit_base.h
>
25
26
using namespace
application
;
27
using namespace
basis
;
28
using namespace
configuration
;
29
using namespace
loggers
;
30
using namespace
textual
;
31
using namespace
unit_test
;
32
33
#define LOG(s) EMERGENCY_LOG(program_wide_logger::get(), astring(s))
34
35
class
test_system_values :
virtual
public
unit_base
,
virtual
public
application_shell
36
{
37
public
:
38
test_system_values()
39
:
application_shell
(),
40
events(system_values::EVENT_VALUES()),
41
filters(system_values::FILTER_VALUES()),
42
outcomes(system_values::OUTCOME_VALUES())
43
{}
44
45
DEFINE_CLASS_NAME
(
"test_system_values"
);
46
virtual
int
execute();
47
48
private
:
49
system_values
events;
50
system_values
filters;
51
system_values
outcomes;
52
};
53
54
int
test_system_values::execute()
55
{
56
FUNCDEF
(
"execute"
);
57
58
LOG
(
"Outcome Values"
);
59
LOG
(
"=============="
);
60
LOG
(outcomes.text_form());
61
62
LOG
(
"Filter Values"
);
63
LOG
(
"============="
);
64
LOG
(filters.text_form());
65
66
LOG
(
"Event Values"
);
67
LOG
(
"============"
);
68
LOG
(events.text_form());
69
70
critical_events::alert_message(
astring
(class_name()) +
": works for those functions tested."
);
71
72
return
0;
73
}
74
75
HOOPLE_MAIN
(test_system_values, )
76
application_shell.h
astring.h
application::application_shell
The application_shell is a base object for console programs.
Definition:
application_shell.h:33
basis::astring
Provides a dynamically resizable ASCII character string.
Definition:
astring.h:35
configuration::system_values
This class provides a way to look up generated values used in the code base.
Definition:
system_values.h:39
unit_test::unit_base
Definition:
unit_base.h:59
console_logger.h
DEFINE_CLASS_NAME
#define DEFINE_CLASS_NAME(objname)
Defines the name of a class by providing a couple standard methods.
Definition:
enhance_cpp.h:42
FUNCDEF
#define FUNCDEF(func_in)
FUNCDEF sets the name of a function (and plugs it into the callstack).
Definition:
enhance_cpp.h:54
functions.h
guards.h
hoople_main.h
Provides macros that implement the 'main' program of an application.
HOOPLE_MAIN
#define HOOPLE_MAIN(obj_name, obj_args)
options that should work for most unix and linux apps.
Definition:
hoople_main.h:61
application
Implements an application lock to ensure only one is running at once.
Definition:
application_shell.cpp:40
basis
The guards collection helps in testing preconditions and reporting errors.
Definition:
array.h:30
configuration
Definition:
registry_config.cpp:45
loggers
A logger that sends to the console screen using the standard output device.
Definition:
combo_logger.cpp:36
textual
Definition:
byte_formatter.cpp:38
unit_test
Useful support functions for unit testing, especially within hoople.
Definition:
unit_base.cpp:35
static_memory_gremlin.h
system_values.h
LOG
#define LOG(s)
Definition:
test_system_values.cpp:33
unit_base.h
nucleus
library
tests_configuration
test_system_values.cpp
Generated by
1.9.1