diff --git a/projs/shadow-file-format-test/pch.h b/projs/shadow-file-format-test/pch.h index 0572a70..6a19cdc 100644 --- a/projs/shadow-file-format-test/pch.h +++ b/projs/shadow-file-format-test/pch.h @@ -5,3 +5,6 @@ #pragma once #include "gtest/gtest.h" + +#include +#include \ No newline at end of file diff --git a/projs/shadow-file-format-test/test.cpp b/projs/shadow-file-format-test/test.cpp index c0bb16c..e140181 100644 --- a/projs/shadow-file-format-test/test.cpp +++ b/projs/shadow-file-format-test/test.cpp @@ -2,7 +2,23 @@ import Shadow.FileFormat; +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) { - EXPECT_EQ(1, 1); - EXPECT_TRUE(true); + + 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"); } \ No newline at end of file