First actual unit test
This commit is contained in:
parent
b1523d13a6
commit
10625e731a
|
@ -5,3 +5,6 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "gtest/gtest.h"
|
#include "gtest/gtest.h"
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <sstream>
|
|
@ -2,7 +2,23 @@
|
||||||
|
|
||||||
import Shadow.FileFormat;
|
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) {
|
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");
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user