ultimatepp/autotest/PPTest/PPTest.cpp
cxl 0766826c68 .autotest
git-svn-id: svn://ultimatepp.org/upp/trunk@8431 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2015-05-11 19:39:15 +00:00

29 lines
525 B
C++

#include <Core/Core.h>
#include <CppBase/CppBase.h>
using namespace Upp;
CONSOLE_APP_MAIN
{
StdLogSetup(LOG_FILE|LOG_COUT);
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");
}