1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-23 00:28:08 +02:00

Advance Json serializer

* added bool, numeric and string support
* added some enum support
* PoC implementation of logical id condition
* Refactoring
This commit is contained in:
AlexVinS
2016-02-14 14:22:46 +03:00
parent 67b03b9658
commit ec760632a6
11 changed files with 517 additions and 248 deletions

View File

@ -61,12 +61,13 @@ BOOST_GLOBAL_FIXTURE(CMapTestFixture);
BOOST_AUTO_TEST_CASE(CMapFormatVCMI_Simple)
{
logGlobal->info("CMapFormatVCMI_Simple start");
BOOST_TEST_CHECKPOINT("CMapFormatVCMI_Simple start");
CMemoryBuffer serializeBuffer;
{
CMapSaverJson saver(&serializeBuffer);
saver.saveMap(initialMap);
}
BOOST_TEST_CHECKPOINT("CMapFormatVCMI_Simple serialized");
#if 1
{
auto path = VCMIDirs::get().userDataPath()/"test.vmap";
@ -79,7 +80,7 @@ BOOST_AUTO_TEST_CASE(CMapFormatVCMI_Simple)
logGlobal->infoStream() << "Test map has been saved to " << path;
}
BOOST_TEST_CHECKPOINT("CMapFormatVCMI_Simple saved");
#endif // 1