mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
.upptst
git-svn-id: svn://ultimatepp.org/upp/trunk@7196 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3a7254eb8c
commit
83c67cd38f
4 changed files with 45 additions and 0 deletions
30
upptst/INI/INI.cpp
Normal file
30
upptst/INI/INI.cpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#include <Core/Core.h>
|
||||
|
||||
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"));
|
||||
}
|
||||
}
|
||||
10
upptst/INI/INI.upp
Normal file
10
upptst/INI/INI.upp
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
uses
|
||||
Core;
|
||||
|
||||
file
|
||||
test.ini,
|
||||
INI.cpp;
|
||||
|
||||
mainconfig
|
||||
"" = "SSE2";
|
||||
|
||||
4
upptst/INI/init
Normal file
4
upptst/INI/init
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
#ifndef _INI_icpp_init_stub
|
||||
#define _INI_icpp_init_stub
|
||||
#include "Core/init"
|
||||
#endif
|
||||
1
upptst/INI/test.ini
Normal file
1
upptst/INI/test.ini
Normal file
|
|
@ -0,0 +1 @@
|
|||
text = Just a test
|
||||
Loading…
Add table
Add a link
Reference in a new issue