there's no excuse not to do bdd/tdd in c++ projects


there’s no excuse not to do bdd/tdd/ci (and many more) in cross-platform c++ projects

All tests are run on travis-ci: Build Status

See the config for details: .travis.yml



see commits and:

generating build files

[path_to]/premake5 [build_target]

run [path_to]/premake5 --help to find a suitable [build_target]

if a feature is not implemented for the chosen platform in premake5, try premake4, since premake5 is still in “alpha”.

customizing BOOST location (MS Windows)

in premake4.lua prior to boost:set_* calls, the paths to BOOST can be customized.

Either the environment variable BOOST should be set to the BOOST root, or it can be set directly, i.e. boost.includedirs.windows = [[d:\\my_boost\1.55]].

The library paths are typically more complex, thus boost:set_libdirs() uses a pattern (see substitutions boost.lua, based on BOOST binaries). boost.libdirs_pattern.windows can be modified according to the installation, i.e.

boost.libdirs_pattern.windows = path.join(boost.includedirs.windows,'lib/$(PlatformTarget)')

If you use boost in a custom configuration and you have to set defines, you can add defines in similar fashion:

local d = boost.defines.windows
d[#d+1] = 'BOOST_REGEX_...'
d[#d+1] = 'BOOST_....WHATEVER'

running cucumber steps

prerequisite: cucumber should be installed

Start cucumber and the steps runner using [path_to]/premake4 cucumber. The actual command line is bin/[path_to]/cucumber_example > /dev/null & cucumber on *X, and start bin\[path_to]\cucumber_example && cucumber on MS Windows.

running busted tests

prerequisite: busted, i.e. installed via luarocks



Top Contributors