[libcalamares] Support switching public/private during tests

This commit is contained in:
Adriaan de Groot 2020-08-11 10:16:00 +02:00
parent e96198e61c
commit 9c382e3555

View File

@ -1,5 +1,5 @@
/* === This file is part of Calamares - <https://github.com/calamares> ===
*
*
* SPDX-FileCopyrightText: 2014 Teo Mrnjavac <teo@kde.org>
* SPDX-FileCopyrightText: 2020 Adriaan de Groot <groot@kde.org>
*
@ -76,4 +76,16 @@
#endif
#endif
/*
* For private functions that should be public for testing purposes,
* use PRIVATETEST, which is private except when building tests.
*/
#ifndef PRIVATETEST
#if defined( BUILD_AS_TEST )
#define PRIVATETEST public
#else
#define PRIVATETEST private
#endif
#endif
#endif