Test framework up.

20 views
Skip to first unread message

Giancarlo Niccolai

unread,
Jan 9, 2018, 6:46:48 PM1/9/18
to FalconPL

A simple GTEST-like library is up in the GITHUB repo. It's called "FUT" (falcon unit test), and although a bit rough and incomplete, it's ready to support test-oriented development for the engine, for modules and for third party applications.


It's integrated with ctest through a new function in the cmake/utils.cmake library, falcon_add_fut(), which adds a unit test to ctest and prepares resources for installation, if the FALCON_INSTALL_TESTS option is ON.

The following is still missing, to be done in the next days:

  • Options parser for the command line
  • Generation of a report file for the single unit test (pretty output on stdout is already available)
  • Performance recording (i.e. timer)
  • Maybe, add a form of test adapters (common initialization shared across multiple tests).
FUT is also a way to bootstrap the workflow cycle; now we have a running CMAKE/make/make tests  building and running multiple applications in the build directory, so we can start playing with the code and have test applications to test the changes we're making

Other than completing the FUT, the next steps involve reviewing the class structure. I plan to unify the "base" class, the BOM (basic object model), the FalconClass and the HyperClass under a single umbrella, through a concept that might be seen as the "Item Handler". This will have three advantages:

  1. Simplify the interface so that developer will have less concepts to get accustomed with, and will have immediate access to the full power of Falcon items.
  2. By supporting any kind of entity no matter how simple, any kind of entity could have delegation/summoning with minimal incremental complexity.
  3. By using a set of function pointers natively in place of the virtual mechanism, we'll have greater flexibility and (potential) improved performance.
Have fun.

Reply all
Reply to author
Forward
0 new messages