Luanti 5.11.0-dev
 
Loading...
Searching...
No Matches
TestSettings Class Reference
+ Inheritance diagram for TestSettings:
+ Collaboration diagram for TestSettings:

Public Member Functions

 TestSettings ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
void testAllSettings ()
 
void testDefaults ()
 
void testFlagDesc ()
 
- Public Member Functions inherited from TestBase
bool testModule (IGameDef *gamedef)
 
std::string getTestTempDirectory ()
 
std::string getTestTempFile ()
 
void runTest (const char *name, std::function< void()> &&test)
 

Static Public Attributes

static const char * config_text_before
 
static const char * config_text_after
 

Additional Inherited Members

- Public Attributes inherited from TestBase
u32 num_tests_failed
 
u32 num_tests_run
 

Constructor & Destructor Documentation

◆ TestSettings()

TestSettings::TestSettings ( )
inline

References TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestSettings::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

void TestSettings::runTests ( IGameDef * gamedef)
virtual

Implements TestBase.

References TEST, testAllSettings(), testDefaults(), and testFlagDesc().

+ Here is the call graph for this function:

◆ testAllSettings()

void TestSettings::testAllSettings ( )

◆ testDefaults()

void TestSettings::testDefaults ( )

References Settings::createLayer(), Settings::get(), Settings::getLayer(), Settings::set(), set_default_settings(), SL_DEFAULTS, SL_GAME, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ testFlagDesc()

void TestSettings::testFlagDesc ( )

References Settings::createLayer(), Settings::getFlagStr(), readFlagString(), Settings::set(), Settings::setDefault(), SL_GAME, and UASSERT.

Referenced by runTests().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ config_text_after

const char * TestSettings::config_text_after
static

Referenced by testAllSettings().

◆ config_text_before

const char * TestSettings::config_text_before
static
Initial value:
=
u8"leet = 1337\n"
"leetleet = 13371337\n"
"leetleet_neg = -13371337\n"
"floaty_thing = 1.1\n"
"stringy_thing = asd /( ¤%&(/\" BLÖÄRP\n"
"coord = (1, 2, 4.5)\n"
" # this is just a comment\n"
"this is an invalid line\n"
"asdf = {\n"
" a = 5\n"
" bb = 2.5\n"
" ccc = \"\"\"\n"
"testy\n"
" testa \n"
"\"\"\"\n"
"\n"
"}\n"
"blarg = \"\"\" \n"
"some multiline text\n"
" with leading whitespace!\n"
"\"\"\"\n"
"np_terrain = 5, 40, (250, 250, 250), 12341, 5, 0.700012505, 2.40012503\n"
"zoop = true\n"
"[dummy_eof_end_tag]\n"

Referenced by testAllSettings().


The documentation for this class was generated from the following file: