First actual unit test

This commit is contained in:
dpeter99 2022-05-27 01:18:16 +02:00
parent b1523d13a6
commit 10625e731a
2 changed files with 21 additions and 2 deletions

View File

@ -5,3 +5,6 @@
#pragma once
#include "gtest/gtest.h"
#include <string>
#include <sstream>

View File

@ -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");
}