mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 12:55:34 +00:00
Simple pass over the codebase to standardize the platform types.
This commit is contained in:
parent
c75d6feb20
commit
4c35fd37af
189 changed files with 824 additions and 824 deletions
|
|
@ -40,10 +40,10 @@ TestRegistry *TestRegistry::_list = 0;
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
static const int MaxMarginCount = 32;
|
||||
static const int MaxMarginValue = 128;
|
||||
static int _Margin[MaxMarginCount] = { 3 };
|
||||
static int* _MarginPtr = _Margin;
|
||||
static const S32 MaxMarginCount = 32;
|
||||
static const S32 MaxMarginValue = 128;
|
||||
static S32 _Margin[MaxMarginCount] = { 3 };
|
||||
static S32* _MarginPtr = _Margin;
|
||||
static char _MarginString[MaxMarginValue];
|
||||
|
||||
static void _printMargin()
|
||||
|
|
@ -52,7 +52,7 @@ static void _printMargin()
|
|||
::fwrite(_MarginString,1,*_MarginPtr,stdout);
|
||||
}
|
||||
|
||||
void UnitMargin::Push(int margin)
|
||||
void UnitMargin::Push(S32 margin)
|
||||
{
|
||||
if (_MarginPtr < _Margin + MaxMarginCount) {
|
||||
*++_MarginPtr = (margin < MaxMarginValue)? margin: MaxMarginValue;
|
||||
|
|
@ -68,7 +68,7 @@ void UnitMargin::Pop()
|
|||
}
|
||||
}
|
||||
|
||||
int UnitMargin::Current()
|
||||
S32 UnitMargin::Current()
|
||||
{
|
||||
return *_MarginPtr;
|
||||
}
|
||||
|
|
@ -247,7 +247,7 @@ bool TestRun::test(const char* module, bool skipInteractive)
|
|||
{
|
||||
StringTableEntry cwdSave = Platform::getCurrentDirectory();
|
||||
|
||||
int len = strlen(module);
|
||||
S32 len = strlen(module);
|
||||
|
||||
const char *skipMsg = skipInteractive ? "(skipping interactive tests)" : "";
|
||||
|
||||
|
|
|
|||
|
|
@ -34,9 +34,9 @@ namespace UnitTesting {
|
|||
|
||||
struct UnitMargin
|
||||
{
|
||||
static void Push(int margin);
|
||||
static void Push(S32 margin);
|
||||
static void Pop();
|
||||
static int Current();
|
||||
static S32 Current();
|
||||
};
|
||||
|
||||
void UnitPrint(const char* msg);
|
||||
|
|
@ -45,9 +45,9 @@ void UnitPrint(const char* msg);
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
class UnitTest {
|
||||
int _testCount;
|
||||
int _failureCount;
|
||||
int _warningCount;
|
||||
S32 _testCount;
|
||||
S32 _failureCount;
|
||||
S32 _warningCount;
|
||||
|
||||
bool _lastTestResult;
|
||||
|
||||
|
|
@ -70,9 +70,9 @@ public:
|
|||
/// Report a warning
|
||||
void warn(const char* msg);
|
||||
|
||||
int getTestCount() const { return _testCount; }
|
||||
int getFailureCount() const { return _failureCount; }
|
||||
int getWarningCount() const { return _warningCount; }
|
||||
S32 getTestCount() const { return _testCount; }
|
||||
S32 getFailureCount() const { return _failureCount; }
|
||||
S32 getWarningCount() const { return _warningCount; }
|
||||
bool lastTestPassed() const { return _lastTestResult; }
|
||||
|
||||
/// Implement this with the specific test.
|
||||
|
|
@ -139,10 +139,10 @@ public:
|
|||
//-----------------------------------------------------------------------------
|
||||
|
||||
class TestRun {
|
||||
int _testCount;
|
||||
int _subCount;
|
||||
int _failureCount;
|
||||
int _warningCount;
|
||||
S32 _testCount;
|
||||
S32 _subCount;
|
||||
S32 _failureCount;
|
||||
S32 _warningCount;
|
||||
void test(TestRegistry* reg);
|
||||
public:
|
||||
TestRun();
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ CreateUnitTest( TestMatrixMul, "Math/Matrix/Multiply" )
|
|||
// I am not positive that the best way to do this is to use random numbers
|
||||
// but I think that using some kind of standard matrix may not always catch
|
||||
// all problems.
|
||||
for( int i = 0; i < 16; i++ )
|
||||
for( S32 i = 0; i < 16; i++ )
|
||||
{
|
||||
m1[i] = gRandGen.randF();
|
||||
m2[i] = gRandGen.randF();
|
||||
|
|
@ -71,7 +71,7 @@ CreateUnitTest( TestMatrixMul, "Math/Matrix/Multiply" )
|
|||
{
|
||||
Athlon_MatrixF_x_MatrixF( m1, m2, mrAMD );
|
||||
|
||||
for( int i = 0; i < 16; i++ )
|
||||
for( S32 i = 0; i < 16; i++ )
|
||||
same &= mIsEqual( mrC[i], mrAMD[i] );
|
||||
|
||||
test( same, "Matrix multiplication verification failed. (C vs. 3D NOW!)" );
|
||||
|
|
@ -87,7 +87,7 @@ CreateUnitTest( TestMatrixMul, "Math/Matrix/Multiply" )
|
|||
{
|
||||
SSE_MatrixF_x_MatrixF( m1, m2, mrSSE );
|
||||
|
||||
for( int i = 0; i < 16; i++ )
|
||||
for( S32 i = 0; i < 16; i++ )
|
||||
same &= mIsEqual( mrC[i], mrSSE[i] );
|
||||
|
||||
test( same, "Matrix multiplication verification failed. (C vs. SSE)" );
|
||||
|
|
@ -105,7 +105,7 @@ CreateUnitTest( TestMatrixMul, "Math/Matrix/Multiply" )
|
|||
|
||||
vec_MatrixF_x_MatrixF( m1, m2, mrVEC );
|
||||
|
||||
for( int i = 0; i < 16; i++ )
|
||||
for( S32 i = 0; i < 16; i++ )
|
||||
same &= isEqual( mrC[i], mrVEC[i] );
|
||||
|
||||
test( same, "Matrix multiplication verification failed. (C vs. Altivec)" );
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ CreateUnitTest( TestThreadStatic, "Core/ThreadStatic" )
|
|||
if( lastTestPassed() )
|
||||
{
|
||||
// Traverse the list and compare it to the initial value copy (index 0)
|
||||
for( int i = 0; i < _TorqueThreadStaticReg::getStaticList().size(); i++ )
|
||||
for( S32 i = 0; i < _TorqueThreadStaticReg::getStaticList().size(); i++ )
|
||||
{
|
||||
_TorqueThreadStatic *master = _TorqueThreadStaticReg::getStaticList()[i];
|
||||
_TorqueThreadStatic *cpy = (*testInstance)[i];
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ CreateUnitTest( TestThreadStaticPerformance, "Core/ThreadStaticPerformance" )
|
|||
// an array of values to standardize the tests on.
|
||||
U32 testValue[TEST_SIZE];
|
||||
|
||||
for( int i = 0; i < TEST_SIZE; i++ )
|
||||
for( S32 i = 0; i < TEST_SIZE; i++ )
|
||||
testValue[i] = gRandGen.randI();
|
||||
|
||||
// Reset the profiler, tell it to dump to console when done
|
||||
|
|
@ -68,7 +68,7 @@ CreateUnitTest( TestThreadStaticPerformance, "Core/ThreadStaticPerformance" )
|
|||
PROFILE_END();
|
||||
|
||||
PROFILE_START(ThreadStaticPerf_InstanceStaticAssign);
|
||||
for( int i = 0; i < TEST_SIZE; i++ )
|
||||
for( S32 i = 0; i < TEST_SIZE; i++ )
|
||||
ATTS_( gInstancedStaticFoo, 1 ) = testValue[i];
|
||||
PROFILE_END();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue