Ares
Static Public Member Functions

TestScaffold Class Reference

#include <src/Misc/TestBox.h>

List of all members.

Static Public Member Functions

static void FloatToIntTest ()
static void GameCastTest ()

Member Function Documentation

void TestScaffold::FloatToIntTest ( ) [static]
                                  {
        Debug::Log("Starting FloatToInt test\n");

        for(int i = 0; i < 10; ++i) {
                for(double f = -5.75; f <= 5.75; f += 0.05) {
                        Debug::Log("%lf -> %I64d\n", f, Game::F2I(f));
                }
        }

        Debug::Log("Finished FloatToInt test\n");
}
void TestScaffold::GameCastTest ( ) [static]
                                {
        Debug::Log("Starting g_c test\n");
        ObjectClass *O = NULL; // doesn't matter how you got the pointer, as long as it's valid... check for NULL yourselves
        
        if(BuildingClass *B = specific_cast<BuildingClass *>(O)) {
                Debug::Log("Casted to Building - correct\n");
        }

        if(AircraftClass *A = specific_cast<AircraftClass *>(O)) {
                Debug::Log("Casted to Aircraft - wtf?\n");
        }
        Debug::Log("Finished g_c test\n");
}

The documentation for this class was generated from the following files:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines