tdf#152943: Add NaN payload check at the start of sc_ucalc test sequence

Some archs does not support NaN payload(e.g. riscv64).
  It would be meaningless to continue building a test related
  to NaN payload if the builder doesn't support this feature.

Change-Id: I895a8647bf7ff68f645faa7428d30b1c741669f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/175293
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
This commit is contained in:
Sakura286 2024-10-21 12:49:05 +08:00 committed by Eike Rathke
parent ad6f39b19c
commit 6a7dd6fcd9
3 changed files with 42 additions and 0 deletions

View file

@ -0,0 +1,14 @@
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#*************************************************************************
#
# This file is part of the LibreOffice project.
#
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
#*************************************************************************
$(eval $(call sc_ucalc_test,_nanpayload))
# vim: set noet sw=4 ts=4:

View file

@ -43,6 +43,7 @@ $(eval $(call gb_Module_add_check_targets,sc,\
Library_scqahelper \
$(if $(and $(filter $(COM),MSC),$(MERGELIBS)),, \
CppunitTest_sc_ucalc) \
CppunitTest_sc_ucalc_nanpayload \
CppunitTest_sc_ucalc_condformat \
CppunitTest_sc_ucalc_copypaste \
CppunitTest_sc_ucalc_datatransformation \

View file

@ -0,0 +1,27 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* This file is part of the LibreOffice project.
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include "helper/qahelper.hxx"
#include <test/nanpayload_test.hxx>
class TestNanPayload : public ScUcalcTestBase
{
};
CPPUNIT_TEST_FIXTURE(TestNanPayload, testNanPayload)
{
// Some tests, such as testExternalRefFunctions, testFuncGCD, and testFuncGCD, evaluates
// spreadsheet functions' error code, which need NaN payload feature of the hardware
NanPayloadTest nanTest;
CPPUNIT_ASSERT_MESSAGE(nanTest.getMessage(), nanTest.getIfSupported());
}
CPPUNIT_PLUGIN_IMPLEMENT();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */