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

Public Member Functions

 TestUtilities ()
 
const char * getName ()
 
void runTests (IGameDef *gamedef)
 
void testAngleWrapAround ()
 
void testWrapDegrees_0_360_v3f ()
 
void testLowercase ()
 
void testTrim ()
 
void testIsYes ()
 
void testRemoveStringEnd ()
 
void testUrlEncode ()
 
void testUrlDecode ()
 
void testPadString ()
 
void testStartsWith ()
 
void testStrEqual ()
 
void testStrToIntConversion ()
 
void testStringReplace ()
 
void testStringAllowed ()
 
void testAsciiPrintableHelper ()
 
void testUTF8 ()
 
void testRemoveEscapes ()
 
void testWrapRows ()
 
void testEnrichedString ()
 
void testIsNumber ()
 
void testIsPowerOfTwo ()
 
void testMyround ()
 
void testStringJoin ()
 
void testEulerConversion ()
 
void testBase64 ()
 
void testSanitizeDirName ()
 
void testIsBlockInSight ()
 
void testColorizeURL ()
 
void testSanitizeUntrusted ()
 
- 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)
 

Additional Inherited Members

- Public Attributes inherited from TestBase
u32 num_tests_failed
 
u32 num_tests_run
 

Constructor & Destructor Documentation

◆ TestUtilities()

TestUtilities::TestUtilities ( )
inline

References TestManager::registerTestModule().

+ Here is the call graph for this function:

Member Function Documentation

◆ getName()

const char * TestUtilities::getName ( )
inlinevirtual

Implements TestBase.

◆ runTests()

◆ testAngleWrapAround()

void TestUtilities::testAngleWrapAround ( )

References modulo360f(), ref_WrapDegrees180(), ref_WrapDegrees_0_360(), UASSERT, wrapDegrees_0_360(), and wrapDegrees_180().

Referenced by runTests().

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

◆ testAsciiPrintableHelper()

void TestUtilities::testAsciiPrintableHelper ( )

References IS_ASCII_PRINTABLE_CHAR, and UASSERT.

Referenced by runTests().

+ Here is the caller graph for this function:

◆ testBase64()

void TestUtilities::testBase64 ( )

References base64_is_valid(), and UASSERT.

Referenced by runTests().

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

◆ testColorizeURL()

void TestUtilities::testColorizeURL ( )

References UASSERTEQ, and warningstream.

Referenced by runTests().

+ Here is the caller graph for this function:

◆ testEnrichedString()

void TestUtilities::testEnrichedString ( )

References EnrichedString::getBackground(), EnrichedString::getColors(), EnrichedString::getString(), EnrichedString::setDefaultColor(), EnrichedString::substr(), and UASSERT.

Referenced by runTests().

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

◆ testEulerConversion()

void TestUtilities::testEulerConversion ( )

References getPitchYawRoll(), getPitchYawRollRad(), roundTripsDeg(), setPitchYawRoll(), setPitchYawRollRad(), UASSERT, and within().

Referenced by runTests().

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

◆ testIsBlockInSight()

void TestUtilities::testIsBlockInSight ( )

References apply_all(), BS, cast_v3, isBlockInSight(), MAP_BLOCKSIZE, and UASSERT.

Referenced by runTests().

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

◆ testIsNumber()

void TestUtilities::testIsNumber ( )

References is_number(), and UASSERT.

Referenced by runTests().

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

◆ testIsPowerOfTwo()

void TestUtilities::testIsPowerOfTwo ( )

References is_power_of_two(), U32_MAX, and UASSERT.

Referenced by runTests().

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

◆ testIsYes()

void TestUtilities::testIsYes ( )

References is_yes(), and UASSERT.

Referenced by runTests().

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

◆ testLowercase()

void TestUtilities::testLowercase ( )

References lowercase(), and UASSERTEQ.

Referenced by runTests().

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

◆ testMyround()

void TestUtilities::testMyround ( )

References myround(), and UASSERT.

Referenced by runTests().

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

◆ testPadString()

void TestUtilities::testPadString ( )

References padStringRight(), and UASSERT.

Referenced by runTests().

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

◆ testRemoveEscapes()

void TestUtilities::testRemoveEscapes ( )

References UASSERT, and unescape_enriched().

Referenced by runTests().

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

◆ testRemoveStringEnd()

void TestUtilities::testRemoveStringEnd ( )

References removeStringEnd(), and UASSERT.

Referenced by runTests().

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

◆ testSanitizeDirName()

void TestUtilities::testSanitizeDirName ( )

References sanitizeDirName(), and UASSERTEQ.

Referenced by runTests().

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

◆ testSanitizeUntrusted()

void TestUtilities::testSanitizeUntrusted ( )

References sanitize_untrusted(), str_ends_with(), str_starts_with(), UASSERT, and UASSERTEQ.

Referenced by runTests().

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

◆ testStartsWith()

void TestUtilities::testStartsWith ( )

References str_starts_with(), and UASSERT.

Referenced by runTests().

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

◆ testStrEqual()

void TestUtilities::testStrEqual ( )

References str_equal(), UASSERT, and utf8_to_wide().

Referenced by runTests().

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

◆ testStringAllowed()

void TestUtilities::testStringAllowed ( )

References string_allowed(), string_allowed_blacklist(), and UASSERT.

Referenced by runTests().

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

◆ testStringJoin()

void TestUtilities::testStringJoin ( )

References str_join(), and UASSERT.

Referenced by runTests().

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

◆ testStringReplace()

void TestUtilities::testStringReplace ( )

References str_replace(), and UASSERT.

Referenced by runTests().

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

◆ testStrToIntConversion()

void TestUtilities::testStrToIntConversion ( )

References mystoi(), and UASSERT.

Referenced by runTests().

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

◆ testTrim()

void TestUtilities::testTrim ( )

References trim(), and UASSERT.

Referenced by runTests().

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

◆ testUrlDecode()

void TestUtilities::testUrlDecode ( )

References UASSERT, and urldecode().

Referenced by runTests().

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

◆ testUrlEncode()

void TestUtilities::testUrlEncode ( )

References UASSERT, and urlencode().

Referenced by runTests().

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

◆ testUTF8()

void TestUtilities::testUTF8 ( )

References UASSERT, UASSERTEQ, utf8_to_wide(), and wide_to_utf8().

Referenced by runTests().

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

◆ testWrapDegrees_0_360_v3f()

void TestUtilities::testWrapDegrees_0_360_v3f ( )

References UASSERT, and wrapDegrees_0_360_v3f().

Referenced by runTests().

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

◆ testWrapRows()

void TestUtilities::testWrapRows ( )

References UASSERT, utf8_to_wide(), and wrap_rows().

Referenced by runTests().

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

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