ultimatepp/autotest/PPTest/PPTest.cpp
cxl fed7ea2554 .autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@8430 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2015-05-11 19:36:05 +00:00

27 lines
489 B
C++

#include <Core/Core.h>
#include <CppBase/CppBase.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
String path = GetDataFile("test.in");
PPSync(GetFileFolder(path));
Cpp cpp;
FileIn in(path);
cpp.Preprocess(path, in, path);
String s = cpp.output;
String opath = GetDataFile("test.out");
LOG("======================");
LOG(cpp.output);
#ifdef flagSAVE
SaveFile(opath, s);
#else
ASSERT(LoadFile(opath) == s);
#endif
LOG("===================== OK");
}