Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Functions | Variables
TestAIGraphPlugin_BT.cpp File Reference

Comprehensive tests for AIGraphPlugin_BT (Phase 1.2) More...

#include "../AIGraphPlugin_BT/BTNodeRegistry.h"
#include "../AIGraphPlugin_BT/BTGraphValidator.h"
#include "../AIGraphPlugin_BT/BTGraphCompiler.h"
#include "../AIGraphPlugin_BT/BTNodePalette.h"
#include "../../NodeGraphCore/GraphDocument.h"
#include "../BehaviorTree.h"
#include <iostream>
#include <cassert>
#include <string>
+ Include dependency graph for TestAIGraphPlugin_BT.cpp:

Go to the source code of this file.

Functions

void ReportTest (const std::string &testName, bool passed)
 
void Test1_RegistryInitialization ()
 
void Test2_NodeTypeQuery ()
 
void Test3_ValidationValidRoot ()
 
void Test4_ValidationMultipleRoots ()
 
void Test5_ValidationCycle ()
 
void Test6_CompilationSimpleBT ()
 
void Test7_CompilationInvalidNodeType ()
 
void Test8_ValidationChildrenCount ()
 
void Test9_PaletteInstantiation ()
 
void Test10_RegistryCategoryQuery ()
 
int main (int argc, char **argv)
 

Variables

int g_testsPassed = 0
 
int g_testsFailed = 0
 

Detailed Description

Comprehensive tests for AIGraphPlugin_BT (Phase 1.2)

Author
Olympe Engine
Date
2026-02-18

Tests all components of AIGraphPlugin_BT:

Note
This is a test file. Test output uses std::cout which is acceptable for test reporting purposes. Production code uses SYSTEM_LOG.

Definition in file TestAIGraphPlugin_BT.cpp.

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

◆ ReportTest()

void ReportTest ( const std::string testName,
bool  passed 
)

◆ Test10_RegistryCategoryQuery()

void Test10_RegistryCategoryQuery ( )

Definition at line 253 of file TestAIGraphPlugin_BT.cpp.

References Olympe::AI::BTNodeRegistry::Get(), GetComponentTypeID_Static(), and ReportTest().

Referenced by main().

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

◆ Test1_RegistryInitialization()

void Test1_RegistryInitialization ( )

Definition at line 49 of file TestAIGraphPlugin_BT.cpp.

References Olympe::AI::BTNodeRegistry::Get(), GetComponentTypeID_Static(), and ReportTest().

Referenced by main().

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

◆ Test2_NodeTypeQuery()

void Test2_NodeTypeQuery ( )

Definition at line 60 of file TestAIGraphPlugin_BT.cpp.

References Olympe::AI::BTNodeRegistry::Get(), GetComponentTypeID_Static(), and ReportTest().

Referenced by main().

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

◆ Test3_ValidationValidRoot()

void Test3_ValidationValidRoot ( )

Definition at line 75 of file TestAIGraphPlugin_BT.cpp.

References GetComponentTypeID_Static(), ReportTest(), Olympe::NodeGraph::GraphDocument::type, and Olympe::AI::BTGraphValidator::ValidateGraph().

Referenced by main().

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

◆ Test4_ValidationMultipleRoots()

void Test4_ValidationMultipleRoots ( )

Definition at line 107 of file TestAIGraphPlugin_BT.cpp.

References GetComponentTypeID_Static(), ReportTest(), Olympe::NodeGraph::GraphDocument::type, and Olympe::AI::BTGraphValidator::ValidateGraph().

Referenced by main().

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

◆ Test5_ValidationCycle()

void Test5_ValidationCycle ( )

Definition at line 131 of file TestAIGraphPlugin_BT.cpp.

References GetComponentTypeID_Static(), ReportTest(), Olympe::NodeGraph::GraphDocument::type, and Olympe::AI::BTGraphValidator::ValidateGraph().

Referenced by main().

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

◆ Test6_CompilationSimpleBT()

void Test6_CompilationSimpleBT ( )

Definition at line 168 of file TestAIGraphPlugin_BT.cpp.

References Olympe::AI::BTGraphCompiler::Compile(), GetComponentTypeID_Static(), ReportTest(), and Olympe::NodeGraph::GraphDocument::type.

Referenced by main().

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

◆ Test7_CompilationInvalidNodeType()

void Test7_CompilationInvalidNodeType ( )

Definition at line 197 of file TestAIGraphPlugin_BT.cpp.

References Olympe::AI::BTGraphCompiler::Compile(), GetComponentTypeID_Static(), ReportTest(), and Olympe::NodeGraph::GraphDocument::type.

Referenced by main().

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

◆ Test8_ValidationChildrenCount()

void Test8_ValidationChildrenCount ( )

Definition at line 216 of file TestAIGraphPlugin_BT.cpp.

References GetComponentTypeID_Static(), ReportTest(), Olympe::NodeGraph::GraphDocument::type, and Olympe::AI::BTGraphValidator::ValidateGraph().

Referenced by main().

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

◆ Test9_PaletteInstantiation()

void Test9_PaletteInstantiation ( )

Definition at line 240 of file TestAIGraphPlugin_BT.cpp.

References GetComponentTypeID_Static(), Olympe::AI::BTNodePalette::IsDragging(), and ReportTest().

Referenced by main().

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

Variable Documentation

◆ g_testsFailed

int g_testsFailed = 0

Definition at line 34 of file TestAIGraphPlugin_BT.cpp.

Referenced by main(), and ReportTest().

◆ g_testsPassed

int g_testsPassed = 0

Definition at line 33 of file TestAIGraphPlugin_BT.cpp.

Referenced by main(), and ReportTest().