Skip to content

clean-test/migration

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Clean Test Migration

Tests python Codestyle: Black License: BSL-1.0

Clean Test is a modern test framework for C++. This accompanying project provides utilities for migrating existing tests to Clean Test.

We enable conversion of standard test registration and assertion macros. Most importantly this includes a lifting utility that prepares any expression for ct::expect with proper output.

Demo

BOOST_TEST(f() == 0 and 1 == g());

will be converted to

ct::expect(f() == 0_i and 1_i == g());

Use of user-defined literals as well as the clean_test-namespace alias are configurable.

Usage

You can install from source via

poetry install

This enables

poetry run migrate -h

which explains how to use this tool and elaborates all available options.

Disclaimer

Existing unit-test frameworks differ significantly from Clean Test. This is why certain constructs only work with or without Clean Test (e.g. fixtures). We don't aim for migrating everything perfectly, but rather for automating the tedious bits of refactoring. Consequently the migrated tests might need small manual adaptations in order to compile.

We currently only support migration from boost-test. Other unit-test frameworks will be added in the future based on the lifting utilities.

About

Utilities for migrating existing tests to Clean Test

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages