Fix: now building node under house type is corrected, related function refactored .

This commit is contained in:
Zero Fanker 2024-12-16 00:27:15 -05:00
parent ea4c214b04
commit a91ff89091
12 changed files with 154 additions and 79 deletions

28
UnitTest/CIni_Test.h Normal file
View file

@ -0,0 +1,28 @@
#pragma once
#include "StdAfx.h"
class IniTestHelper
{
std::string m_fileName;
void writeDownContent(const char* pContent) {
std::ofstream iniFile(m_fileName.c_str());
ASSERT(iniFile.is_open() == true);
iniFile << pContent;
iniFile.flush();
iniFile.close();
}
public:
IniTestHelper(std::string&& name, const char* pContent) :
m_fileName(std::move(name))
{
ASSERT(!m_fileName.empty());
ASSERT(pContent != nullptr);
writeDownContent(pContent);
}
~IniTestHelper() {
remove(m_fileName.c_str());
}
};