Kaydet (Commit) 27f50cec authored tarafından Markus Mohrhard's avatar Markus Mohrhard

enable sc's c++ subsequenttests related to fdo#43308

üst 27fa364d
......@@ -43,9 +43,8 @@ class ScCellProperties : public UnoApiTest
void testVertJustify();
void testRotateReference();
CPPUNIT_TEST_SUITE(ScCellProperties);
//enable as soon as fixed
//CPPUNIT_TEST(testVertJustify);
//CPPUNIT_TEST(testRotateReference);
CPPUNIT_TEST(testVertJustify);
CPPUNIT_TEST(testRotateReference);
CPPUNIT_TEST_SUITE_END();
};
......@@ -59,12 +58,12 @@ void ScCellProperties::testVertJustify()
std::cout << "Old VertJustify value: " << aValue << std::endl;
uno::Any aNewVertJustify;
aNewVertJustify <<= table::CellVertJustify_BOTTOM;
aNewVertJustify <<= static_cast<sal_Int32>(3);
xCellRangeBase->setPropertyValue(aVertJustify, aNewVertJustify);
uno::Any aVertJustifyControllValue = xCellRangeBase->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
void ScCellProperties::testRotateReference()
......@@ -77,12 +76,12 @@ void ScCellProperties::testRotateReference()
std::cout << "Old RotateReference Value: " << aValue << std::endl;
uno::Any aNewRotateReference;
aNewRotateReference <<= table::CellVertJustify_BOTTOM;
aNewRotateReference <<= static_cast<sal_Int32>(3);
xCellRangeBase->setPropertyValue(aRotateReference, aNewRotateReference);
uno::Any aRotateReferenceControllValue = xCellRangeBase->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New RotateReference value: " << aValue << std::endl;
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
uno::Reference< beans::XPropertySet > ScCellProperties::init()
......
......@@ -29,7 +29,6 @@
#include <test/unoapi_test.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/table/CellVertJustify.hpp>
#include <iostream>
......@@ -43,10 +42,8 @@ public:
void testVertJustify();
CPPUNIT_TEST_SUITE(ScTableAutoFormatField);
// both tests are broken
// related to: 7da57d17b6179e71c8b6d7549ad89eaf3a4a28c6
//CPPUNIT_TEST(testRotateReference);
//CPPUNIT_TEST(testVertJustify);
CPPUNIT_TEST(testRotateReference);
CPPUNIT_TEST(testVertJustify);
CPPUNIT_TEST_SUITE_END();
};
......@@ -72,12 +69,12 @@ void ScTableAutoFormatField::testRotateReference()
std::cout << "Old RotateReferene Value: " << aValue << std::endl;
uno::Any aNewRotateReference;
aNewRotateReference <<= table::CellVertJustify_BOTTOM;
aNewRotateReference <<= static_cast<sal_Int32>(3);
xTableAutoFormatField->setPropertyValue(aRotateReference, aNewRotateReference);
uno::Any aRotateReferenceControllValue = xTableAutoFormatField->getPropertyValue(aRotateReference);
CPPUNIT_ASSERT(aRotateReferenceControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
void ScTableAutoFormatField::testVertJustify()
......@@ -90,12 +87,12 @@ void ScTableAutoFormatField::testVertJustify()
std::cout << "Old VertJustify value: " << aValue << std::endl;
uno::Any aNewVertJustify;
aNewVertJustify <<= table::CellVertJustify_BOTTOM;
aNewVertJustify <<= static_cast<sal_Int32>(3);
xTableAutoFormatField->setPropertyValue(aVertJustify, aNewVertJustify);
uno::Any aVertJustifyControllValue = xTableAutoFormatField->getPropertyValue(aVertJustify);
CPPUNIT_ASSERT(aVertJustifyControllValue >>= aValue);
std::cout << "New VertJustify value: " << aValue << std::endl;
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == table::CellVertJustify_BOTTOM);
CPPUNIT_ASSERT_MESSAGE("value has not been changed", aValue == 3);
}
CPPUNIT_TEST_SUITE_REGISTRATION(ScTableAutoFormatField);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment