#define TEST_PRINTF
#define TEST_REGCONF
#define TEST_REGEX
+ #define TEST_REGEX
#define TEST_REGISTRY
#define TEST_SCOPEGUARD
#define TEST_SNGLINST
#undef TEST_ALL
static const bool TEST_ALL = true;
#else
- #define TEST_HASH
- #define TEST_HASHMAP
- #define TEST_HASHSET
+ #define TEST_FILENAME
static const bool TEST_ALL = false;
#endif
wxPuts(_T(""));
}
+static void TestFileNameDirManip()
+{
+ // TODO: test AppendDir(), RemoveDir(), ...
+}
+
static void TestFileNameComparison()
{
// TODO!
static void TestRegConfWrite()
{
- wxRegConfig regconf(_T("console"), _T("wxwindows"));
- regconf.Write(_T("Hello"), wxString(_T("world")));
+ wxConfig *config = new wxConfig("myapp");
+ config->SetPath("/group1");
+ config->Write("entry1", "foo");
+ config->SetPath("/group2");
+ config->Write("entry1", "bar");
+}
+
+static void TestRegConfRead()
+{
+ wxConfig *config = new wxConfig("myapp");
+
+ wxString str;
+ long dummy;
+ config->SetPath("/");
+ puts("Enumerating / subgroups:");
+ bool bCont = config->GetFirstGroup(str, dummy);
+ while(bCont)
+ {
+ puts(str);
+ bCont = config->GetNextGroup(str, dummy);
+ }
}
#endif // TEST_REGCONF
#endif // TEST_FILE
#ifdef TEST_FILENAME
- if ( 1 )
- {
- wxFileName fn(_T("c:\\foo"), _T("bar.baz"));
- DumpFileName(_T("Before Normalize():"), fn);
-
- fn.Normalize();
- DumpFileName(_T("After Normalize():"), fn);
- }
-
if ( TEST_ALL )
{
TestFileNameConstruction();
TestFileNameSplit();
TestFileNameTemp();
TestFileNameCwd();
+ TestFileNameDirManip();
TestFileNameComparison();
TestFileNameOperations();
}
#endif // TEST_PRINTF
#ifdef TEST_REGCONF
- TestRegConfWrite();
+ //TestRegConfWrite();
+ TestRegConfRead();
#endif // TEST_REGCONF
#ifdef TEST_REGEX