2022-05-26 18:04:35 +00:00
|
|
|
#include "pch.h"
|
|
|
|
|
2022-05-26 21:52:01 +00:00
|
|
|
import Shadow.FileFormat;
|
|
|
|
|
2022-05-26 23:18:16 +00:00
|
|
|
std::string example_str = "ShadowFileFormat_1_0_0 \n\
|
|
|
|
Assets:{ \
|
|
|
|
9:textures / cube_maps / ame_ash / ashcanyon.sff, \
|
|
|
|
10 : textures / models / checker_board.sff, \
|
|
|
|
12 : shaders / skybox / skybox.sff, \
|
|
|
|
} \
|
|
|
|
";
|
|
|
|
|
|
|
|
|
2022-05-26 18:04:35 +00:00
|
|
|
TEST(TestCaseName, TestName) {
|
2022-05-26 23:18:16 +00:00
|
|
|
|
|
|
|
std::stringstream ss;
|
|
|
|
ss << example_str;
|
|
|
|
|
|
|
|
auto a = Shadow::SFF::SFFParser::ReadFromStream(ss);
|
|
|
|
|
|
|
|
auto assets = a->GetChildByIndex(0);
|
|
|
|
|
|
|
|
EXPECT_STREQ(assets->name.c_str(), "Assets");
|
2022-05-26 18:04:35 +00:00
|
|
|
}
|