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

Basic tests for NodeGraphCore module. More...

#include "NodeGraphCore/NodeGraphCore.h"
#include "NodeGraphCore/GraphDocument.h"
#include "NodeGraphCore/NodeGraphManager.h"
#include "NodeGraphCore/CommandSystem.h"
#include "NodeGraphCore/Commands/CreateNodeCommand.h"
#include "NodeGraphCore/Commands/DeleteNodeCommand.h"
#include "NodeGraphCore/Commands/ConnectPinsCommand.h"
#include "NodeGraphCore/Commands/MoveNodeCommand.h"
#include "NodeGraphCore/GraphMigrator.h"
#include <iostream>
#include <cassert>
#include <string>
+ Include dependency graph for TestNodeGraphCore.cpp:

Go to the source code of this file.

Functions

void Test1_CreateGraphDocument ()
 
void Test2_CRUDNodes ()
 
void Test3_ConnectPins ()
 
void Test4_Serialization ()
 
void Test5_MultiGraph ()
 
void Test6_UndoRedo ()
 
void Test7_HasCycles ()
 
void Test8_ValidateGraph ()
 
int main ()
 

Detailed Description

Basic tests for NodeGraphCore module.

Author
Olympe Engine
Date
2026-02-18

This file contains basic tests to validate NodeGraphCore functionality. These tests can be compiled separately for validation purposes.

Definition in file TestNodeGraphCore.cpp.

Function Documentation

◆ main()

int main ( )

◆ Test1_CreateGraphDocument()

void Test1_CreateGraphDocument ( )

Definition at line 28 of file TestNodeGraphCore.cpp.

References GetComponentTypeID_Static(), and Olympe::NodeGraph::GraphDocument::type.

Referenced by main().

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

◆ Test2_CRUDNodes()

void Test2_CRUDNodes ( )

Definition at line 43 of file TestNodeGraphCore.cpp.

References GetComponentTypeID_Static().

Referenced by main().

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

◆ Test3_ConnectPins()

void Test3_ConnectPins ( )

Definition at line 64 of file TestNodeGraphCore.cpp.

References GetComponentTypeID_Static(), and Olympe::NodeGraph::PinId::value.

Referenced by main().

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

◆ Test4_Serialization()

void Test4_Serialization ( )

Definition at line 87 of file TestNodeGraphCore.cpp.

References GetComponentTypeID_Static(), JsonHelper::GetInt(), JsonHelper::GetString(), and Olympe::NodeGraph::GraphDocument::type.

Referenced by main().

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

◆ Test5_MultiGraph()

void Test5_MultiGraph ( )

Definition at line 108 of file TestNodeGraphCore.cpp.

References Olympe::NodeGraph::NodeGraphManager::Get(), and GetComponentTypeID_Static().

Referenced by main().

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

◆ Test6_UndoRedo()

void Test6_UndoRedo ( )

Definition at line 130 of file TestNodeGraphCore.cpp.

References GetComponentTypeID_Static().

Referenced by main().

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

◆ Test7_HasCycles()

void Test7_HasCycles ( )

Definition at line 152 of file TestNodeGraphCore.cpp.

References Olympe::NodeGraph::NodeData::children, and GetComponentTypeID_Static().

Referenced by main().

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

◆ Test8_ValidateGraph()

void Test8_ValidateGraph ( )

Definition at line 183 of file TestNodeGraphCore.cpp.

References GetComponentTypeID_Static(), and Olympe::NodeGraph::GraphDocument::ValidateGraph().

Referenced by main().

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