cpp11-migrate: Use test fixture in preparation for more tests

Existing tests are not changed but the set-up work is moved into a fixture
to simplify forthcoming new tests.