diff --git a/sc/CppunitTest_sc_ucalc_nanpayload.mk b/sc/CppunitTest_sc_ucalc_nanpayload.mk new file mode 100644 index 000000000000..08900a217f6d --- /dev/null +++ b/sc/CppunitTest_sc_ucalc_nanpayload.mk @@ -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: diff --git a/sc/Module_sc.mk b/sc/Module_sc.mk index 4d9f7c9618a6..63dc4b92b90d 100644 --- a/sc/Module_sc.mk +++ b/sc/Module_sc.mk @@ -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 \ diff --git a/sc/qa/unit/ucalc_nanpayload.cxx b/sc/qa/unit/ucalc_nanpayload.cxx new file mode 100644 index 000000000000..c64acd3f5bf4 --- /dev/null +++ b/sc/qa/unit/ucalc_nanpayload.cxx @@ -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 + +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: */