From 6914ad12af3c9f51fa33d733b3355694e0254cdc Mon Sep 17 00:00:00 2001 From: Rahul Gurung Date: Sun, 2 Sep 2018 11:36:24 +0530 Subject: tdf#45904 Move _XCell Java tests to C++ Change-Id: I79d8f42932f81bf8a2eb38fbd3eabbdf56c09111 Reviewed-on: https://gerrit.libreoffice.org/59901 Tested-by: Jenkins Reviewed-by: Jens Carl --- qadevOOo/Jar_OOoRunner.mk | 1 - .../sc/com.sun.star.comp.office.ScCellObj.csv | 6 - qadevOOo/tests/java/ifc/table/_XCell.java | 157 --------------------- 3 files changed, 164 deletions(-) delete mode 100644 qadevOOo/tests/java/ifc/table/_XCell.java (limited to 'qadevOOo') diff --git a/qadevOOo/Jar_OOoRunner.mk b/qadevOOo/Jar_OOoRunner.mk index 4aba76420ecb..c096f498c63a 100644 --- a/qadevOOo/Jar_OOoRunner.mk +++ b/qadevOOo/Jar_OOoRunner.mk @@ -587,7 +587,6 @@ $(eval $(call gb_Jar_add_sourcefiles,OOoRunner,\ qadevOOo/tests/java/ifc/table/_TableColumn \ qadevOOo/tests/java/ifc/table/_TableRow \ qadevOOo/tests/java/ifc/table/_XAutoFormattable \ - qadevOOo/tests/java/ifc/table/_XCell \ qadevOOo/tests/java/ifc/table/_XCellRange \ qadevOOo/tests/java/ifc/table/_XColumnRowRange \ qadevOOo/tests/java/ifc/table/_XTableChart \ diff --git a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv index aab8c8f92f01..b936c50045d4 100644 --- a/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv +++ b/qadevOOo/objdsc/sc/com.sun.star.comp.office.ScCellObj.csv @@ -126,12 +126,6 @@ "ScCellObj";"com::sun::star::sheet::XCellRangesQuery";"queryIntersection()" "ScCellObj";"com::sun::star::container::XElementAccess";"getElementType()" "ScCellObj";"com::sun::star::container::XElementAccess";"hasElements()" -"ScCellObj";"com::sun::star::table::XCell";"getFormula()" -"ScCellObj";"com::sun::star::table::XCell";"setFormula()" -"ScCellObj";"com::sun::star::table::XCell";"getValue()" -"ScCellObj";"com::sun::star::table::XCell";"setValue()" -"ScCellObj";"com::sun::star::table::XCell";"getType()" -"ScCellObj";"com::sun::star::table::XCell";"getError()" "ScCellObj";"com::sun::star::text::XTextRange";"getText()" "ScCellObj";"com::sun::star::text::XTextRange";"getStart()" "ScCellObj";"com::sun::star::text::XTextRange";"getEnd()" diff --git a/qadevOOo/tests/java/ifc/table/_XCell.java b/qadevOOo/tests/java/ifc/table/_XCell.java deleted file mode 100644 index e81776c974db..000000000000 --- a/qadevOOo/tests/java/ifc/table/_XCell.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * 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/. - * - * This file incorporates work covered by the following license notice: - * - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed - * with this work for additional information regarding copyright - * ownership. The ASF licenses this file to you under the Apache - * License, Version 2.0 (the "License"); you may not use this file - * except in compliance with the License. You may obtain a copy of - * the License at http://www.apache.org/licenses/LICENSE-2.0 . - */ - -package ifc.table; - -import lib.MultiMethodTest; -import util.utils; - -import com.sun.star.table.CellContentType; -import com.sun.star.table.XCell; - - -/** -* Testing com.sun.star.table.XCell -* interface methods : -*

-* Test is NOT multithread compliant.

-* @see com.sun.star.table.XCell -*/ -public class _XCell extends MultiMethodTest { - public XCell oObj = null; - - /** - * First time errors checked when a proper formula is entered. - * Second time an incorrect formula entered and errors are checked.

- * Has OK status if in the first case error code 0 returned, - * and in the second case none-zerro code returned.

- * The following method tests are to be completed successfully before : - *

- */ - public void _getError() { - requiredMethod("setFormula()") ; - - boolean result = true; - - if (oObj.getError() != 0) { - result = false ; - log.println("getError(): Expected error code is 0, but returned " + - oObj.getError()) ; - } - oObj.setFormula("=sqrt(-2)") ; // incorrect formula - if (oObj.getError() == 0) { - result = false ; - log.println("getError(): # Non zero error code expected,"+ - " but 0 returned") ; - } - - tRes.tested("getError()", result); - } // end getError() - - /** - * Sets a formula and then gets it.

- * Has OK status if the formula set are the same as get.

- */ - public void _getFormula() { - boolean result = true; - - String formula = ""; - log.println("getFormula()"); - oObj.setFormula("=2+2"); - - formula = oObj.getFormula(); - - result &= formula.endsWith("2+2"); - tRes.tested("getFormula()", result); - } // end getFormula() - - /** - * Gets the type and check it.

- * Has OK status if the type is one of valid values.

- */ - public void _getType() { - boolean result = true; - result = true ; - log.println("getType() ..."); - - if(oObj.getType() == CellContentType.EMPTY) result &= true ; - else if (oObj.getType() == CellContentType.VALUE) result &= true ; - else if (oObj.getType() == CellContentType.TEXT) result &= true ; - else if (oObj.getType() == CellContentType.FORMULA) result &= true ; - else result = false; - - tRes.tested ("getType()", result) ; - } // end getType() - - /** - * Test calls the method.

- * Has OK status if the method successfully returns - * and no exceptions were thrown.

- */ - public void _getValue() { - boolean result = true; - log.println("getValue() ..."); - - oObj.getValue(); - - tRes.tested("getValue()",result); - } // end getValue() - - /** - * Sets a formula and then gets it.

- * Has OK status if the formula set are the same as get.

- */ - public void _setFormula() { - boolean result = true; - String formula = ""; - log.println("setFormula() ..."); - - oObj.setFormula("=2/6") ; - - formula = oObj.getFormula(); - - result &= formula.endsWith("2/6"); - tRes.tested ("setFormula()", result) ; - } // end setFormula - - /** - * Sets a value and then gets it.

- * Has OK status if the value set is equal to value get.

- */ - public void _setValue() { - log.println("setValue() ..."); - - double inValue = 222.333; - oObj.setValue(inValue) ; - double cellValue = oObj.getValue() ; - - boolean result = utils.approxEqual(cellValue, inValue); - tRes.tested("setValue()", result); - } // end setValue() -} - -- cgit