Skip to content
Doug Binks edited this page Sep 29, 2013 · 1 revision

There are new test functions added to IRuntimeObjectSystem and implemented in RuntimeObjectSystem:

struct IRuntimeObjectSystem
{
    // other functions...

    // tests one by one touching each runtime modifiable source file
    // returns the number of errors - 0 if all passed.
   virtual int TestBuildAllRuntimeSourceFiles(
                 ITestBuildNotifier* callback, bool bTestFileTracking ) = 0;

    // tests touching each header which has RUNTIME_MODIFIABLE_INCLUDE.
    // returns the number of errors - 0 if all passed.
    virtual int TestBuildAllRuntimeHeaders(
                 ITestBuildNotifier* callback, bool bTestFileTracking ) = 0;

};

For the most simple use case, the following should be sufficient to perform the required tests:

pRuntimeObjectSystem->CleanObjectFiles();
pRuntimeObjectSystem->TestBuildAllRuntimeSourceFiles( NULL, false );

Have a look at the SimpleTest application example in the source file Game.cpp for a more complete example. This updates the GUI and permits cancelling mid test by closing the application normally. The tests are performed using the Options menu.

Note that the bTestFileTracking parameter should be false for most circumstances. When true this also tests the file change notification system in RCC++ by changing the modification times on the files. This will then require a full rebuild of these when you next come to normally compiling the code. The TestBuildAllRuntimeHeaders function will test the header file tracking code in RCC++. Both of these tests are mainly for those modifying The RuntimeObjectSystem or RuntimeCompiler libraries.

Running these alongside any normal compilation checks on a build server after check-ins is a great way to ensure you don't break RCC++ by accident without realizing.