Revert "Use a variable on the stack to not have a temporary in the call"
[ACE_TAO.git] / ACE / tests / Config_Test.h
blobd125defbdf8a51b9bd7ac17dc6d8183d01ef218e
2 //=============================================================================
3 /**
4 * @file Config_Test.h
6 * This is a test that makes sure the <import_config_as_strings> of
7 * <ACE_Configuration_Heap> class works correctly.
9 * @author Michael Searles <msearles@base16.com> and Jerry D. Odenwelder Jr. <jerry.o@mindspring.com>
11 //=============================================================================
14 #ifndef __CONFIG_TEST_H
15 #define __CONFIG_TEST_H
17 #include "ace/Configuration.h"
19 const int TEST_MAX_STRING = 256;
21 class Config_Test
23 public:
24 Config_Test () : equality_tested_ (0) { }
25 ~Config_Test () { }
27 // Used to test the equality and inequality operations.
28 int testEquality ();
30 // Used to test INI Import Export class
31 int testIniFormat ();
33 // Used to test Regiastry Import Export class
34 // 1. Creates an ACE_Configuration_Heap object
35 // 2. Calls buildConfigObject to populate
36 // 3. Exports
37 // 5. Creates a new ACE_Configuration_Heap object
38 // 6. Imports
39 // 7. Compares to origional.
40 // 8. Clean-up
41 int testRegFormat ();
44 private:
45 // change a value for value change test
46 int change_one (ACE_Configuration &l, u_int a = 101);
48 void get_section_string (ACE_Configuration& config,
49 ACE_Configuration_Section_Key& SectionKey,
50 const ACE_TCHAR* pszName,
51 ACE_TCHAR* pszVariable,
52 int nMaxLength);
54 void get_section_integer (ACE_Configuration& config,
55 ACE_Configuration_Section_Key& SectionKey,
56 const ACE_TCHAR* pszName,
57 int* nVariable,
58 int nMinValue,
59 int nMaxValue);
61 void get_section_boolean (ACE_Configuration& config,
62 ACE_Configuration_Section_Key& SectionKey,
63 const ACE_TCHAR* pszName,
64 int* pVariable);
66 private:
67 int equality_tested_; // make sure the equality operator works before proceeding.
70 #endif /* __CONFIG_TEST_H */