mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 10:31:50 +00:00
feat: support alternative vcm models syntax
This commit is contained in:
parent
8f342fe429
commit
4333d9ab06
10 changed files with 155 additions and 28 deletions
24
test/coders/xml.cpp
Normal file
24
test/coders/xml.cpp
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
#include <gtest/gtest.h>
|
||||
|
||||
#include "coders/xml.hpp"
|
||||
#include "coders/commons.hpp"
|
||||
|
||||
TEST(XML, VCM) {
|
||||
std::string code = ""
|
||||
"@line x1 y1 z1\n"
|
||||
"# @tst ysfdrg\n"
|
||||
"@box {\n"
|
||||
" @rect texture \"$2\"\n"
|
||||
" @utro a 53.1\n"
|
||||
"}\n"
|
||||
;
|
||||
std::cout << code << std::endl;
|
||||
|
||||
try {
|
||||
auto document = xml::parse_vcm("<test>", code, "test");
|
||||
std::cout << xml::stringify(*document);
|
||||
} catch (const parsing_error& err) {
|
||||
std::cerr << err.errorLog() << std::endl;
|
||||
throw err;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue