- Joined
- Jun 26, 2017
- Messages
- 886
My project is getting bigger an sometimes bug are tricky to find, so I am thinking about how to test classes and functions in a more isolated way.
Until now I only had some constants to skip waiting times or some parts of the game and enabling sets of constants with preprocessor directives:
But how would you test single classes or groups of them?
I am also interested in how you go about it or how it should be done properly.
Until now I only had some constants to skip waiting times or some parts of the game and enabling sets of constants with preprocessor directives:
Cerberus:
#Print "************"+AppType +GLFW_GCC_MSIZE_WINNT +"Bit_Build*********"
#if CONFIG="debug"
#Test=True
#EndIf
#Premium=False
#SlowDesktop=True
'Global Settings
Const SCR_WIDTH:Float = 1920
Const SCR_HEIGHT:Float = 1080
Const MUSIC_ON:Bool = False
#If Test
Const GAME_ENABLED:Bool = False
#If Premium
#Print "Test Premium Version"
Const MAX_USER_CNT:Int = 20
#Else
#Print "Test Standard Version"
Const MAX_USER_CNT:Int = 5
#Endif
Const SAVESTATE_INTERVALL:Float = 6000.0
#Else
Const GAME_ENABLED:Bool = True
#If Premium
#Print "Final Premium Version"
Const MAX_USER_CNT:Int = 20
#Else
#Print "Final Standard Version"
Const MAX_USER_CNT:Int = 5
#Endif
Const SAVESTATE_INTERVALL:Float = 60.0
#Endif
But how would you test single classes or groups of them?
I am also interested in how you go about it or how it should be done properly.