From 83c67cd38f14fa78d767ea0fe0550c252370a07e Mon Sep 17 00:00:00 2001 From: cxl Date: Wed, 9 Apr 2014 06:42:23 +0000 Subject: [PATCH] .upptst git-svn-id: svn://ultimatepp.org/upp/trunk@7196 f0d560ea-af0d-0410-9eb7-867de7ffcac7 --- upptst/INI/INI.cpp | 30 ++++++++++++++++++++++++++++++ upptst/INI/INI.upp | 10 ++++++++++ upptst/INI/init | 4 ++++ upptst/INI/test.ini | 1 + 4 files changed, 45 insertions(+) create mode 100644 upptst/INI/INI.cpp create mode 100644 upptst/INI/INI.upp create mode 100644 upptst/INI/init create mode 100644 upptst/INI/test.ini diff --git a/upptst/INI/INI.cpp b/upptst/INI/INI.cpp new file mode 100644 index 000000000..4f21d33d2 --- /dev/null +++ b/upptst/INI/INI.cpp @@ -0,0 +1,30 @@ +#include + +using namespace Upp; + +namespace Config { + +INI_STRING(text, "default text", "Text parameter"); + +}; + +struct Test { + int x; + String a; +}; + +Test y = { 123, "123" }; + +CONSOLE_APP_MAIN +{ + StdLogSetup(LOG_COUT|LOG_FILE); + + SetIniFile(GetDataFile("test.ini")); + + for(;;) { + LOG(Config::text); + LOG(GetIniInfoFormatted()); + getchar(); + SetIniFile(GetDataFile("test.ini")); + } +} diff --git a/upptst/INI/INI.upp b/upptst/INI/INI.upp new file mode 100644 index 000000000..9b2a30748 --- /dev/null +++ b/upptst/INI/INI.upp @@ -0,0 +1,10 @@ +uses + Core; + +file + test.ini, + INI.cpp; + +mainconfig + "" = "SSE2"; + diff --git a/upptst/INI/init b/upptst/INI/init new file mode 100644 index 000000000..2cedd1e6d --- /dev/null +++ b/upptst/INI/init @@ -0,0 +1,4 @@ +#ifndef _INI_icpp_init_stub +#define _INI_icpp_init_stub +#include "Core/init" +#endif diff --git a/upptst/INI/test.ini b/upptst/INI/test.ini new file mode 100644 index 000000000..79c54b5a2 --- /dev/null +++ b/upptst/INI/test.ini @@ -0,0 +1 @@ +text = Just a test \ No newline at end of file