Test cases

From NeoWiki

Table of contents

Test cases

The test cases included in the codebase are useful for testing the conformance of the engine on all platform supported. Below is a quick introduction to each of the test cases.

If you build the test cases with MSVC++ and run them from within the IDE you need to set the current working directory manually, see the build instructions page.

Base tests

The base test cases are console applications testing core (non-graphic-related) functionality in the engine.

Core

The core test case tests the functionality of the core subsystem classes, and also performs a series of benchmarks comparing them to the corresponding STL classes.

Log

The log test case tests the functionality of the log subsystem, with different log output streams and level thresholds and filtering.

Network

The network test case tests the functionality of the network subsystem with the socket stream abstraction and the implemented network protocols such as HTTP.

Script

This test case tests the functionality of the Lua scripting subsystem. It uses the engine bindings present and can also load external lua script files.

Application tests

The more complex application tests all use the application utility library. They all utilize a rendering window, and presents a setup dialog on startup for choosing the settings for the rendering window. The setup is ordered in dependency order from top to bottom. Start with selecting the rendering device to use, then which rendering adapter (usually just one, but on multi-monitor systems there will be one for each head), resolution, color depth and z/stencil buffer depths. If you check the fullscreen box the resolution dropdown will also include refresh rate if the device and adapter supports it.

Image:appsetup.png


In all these tests you can use the keyboard strokes Ctrl+PageUp/PageDown to cycle the rendering resolution up/down, and Alt+Enter to switch between fullscreen and windowed rendering.

Render

Thie test case demonstrates the basic functionality of the render subsystem. Viewports, techniques/programs/shaders, textures, vertex/index buffers are among the base objects tested.

Audio

This test case demonstrates the basic functionality of the audio subsystem, loading and playing a streaming Ogg Vorbis music file. It currently does not test the spatial audio functionality.

Input

This test case tests the input susbsystem and is useful for stress-testing the keyboard input under various input locales. It also shows mouse input. Currently there is no support for joystick/gamepad or other more exotic input devices.

Scene

This test case demonstrates the scene subsystem by creating a simple scene with a spinning box. It uses the material framework in the scene subsystem for rendering the cube with various techniques (disabled at the moment).

Font

This test case tests the functionality of the font and text rendering of the GUI subsystem. It shows the various alignment and direction modes used when rendering text.

GUI

This test case tests the functionality of the whole GUI subsystem (currently it doesn't do much, it will be improved once the GUI editor is more complete).