umbra/projs/shadow-file-format-test/test.cpp

24 lines
476 B
C++
Raw Normal View History

#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, \
} \
";
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");
}