Disable deprecation warning for test of deprecated getters

Otherwise the build fails because we treat all warnings as errors.
This commit is contained in:
Aleš Matěj 2025-01-24 12:02:21 +01:00 committed by Marek Blaha
parent 5802cd0ba6
commit 9f0ad0ed10
1 changed files with 3 additions and 0 deletions

View File

@ -61,10 +61,13 @@ void ConfTest::test_config_repo() {
void ConfTest::test_config_pkg_gpgcheck() {
// Ensure both pkg_gpgcheck and gpgcheck point to the same underlying OptionBool object
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
// For ConfigMain
CPPUNIT_ASSERT_EQUAL(&config.get_pkg_gpgcheck_option(), &config.get_gpgcheck_option());
// For ConfigRepo
repo::ConfigRepo config_repo(config, "test-repo");
CPPUNIT_ASSERT_EQUAL(&config_repo.get_pkg_gpgcheck_option(), &config_repo.get_gpgcheck_option());
#pragma GCC diagnostic pop
}