mirror of
https://github.com/electronicarts/CNC_TS_and_RA2_Mission_Editor.git
synced 2025-04-30 17:11:40 -04:00
24 lines
No EOL
687 B
C++
24 lines
No EOL
687 B
C++
#include "stdafx.h"
|
||
#include "../MissionEditor/IniFile.h"
|
||
|
||
TEST(CIniFileClass, LoadFileTest) {
|
||
auto const iniContent = R"(
|
||
[Debug]
|
||
;DisplayAllOverlay=Yes ; Doesn´t cripple the overlay list in any way
|
||
;EnableTrackLogic=Yes ; Enables Track Logic
|
||
;IgnoreSHPImageHeadUnused=Yes ; Use this *carefully* to make SHP graphics of some mods work that incorrectly have the shadow flag set
|
||
AllowTunnels=yes
|
||
AllowUnidirectionalTunnels=yes
|
||
)";
|
||
|
||
auto const testIni = "test.ini";
|
||
std::ofstream iniFile(testIni);
|
||
iniFile << iniContent;
|
||
iniFile.flush();
|
||
iniFile.close();
|
||
|
||
CIniFile file;
|
||
ASSERT_EQ(file.LoadFile(std::string(testIni)), 0);
|
||
|
||
EXPECT_EQ(true, file.GetBool("Debug","AllowTunnels"));
|
||
} |