diff options
author | Andreas Beeker <kiwiwings@apache.org> | 2021-04-07 21:40:33 +0000 |
---|---|---|
committer | Andreas Beeker <kiwiwings@apache.org> | 2021-04-07 21:40:33 +0000 |
commit | b6aee1ef6d3e92a28ffd4b5c03e677b63b43747f (patch) | |
tree | ad9c7b312976c4ed113a7f3b5b4757bfe1b3eee6 /excelant/src/test/resources | |
parent | 6458acb931a0cc17b2d5ed205a1b3fbbb78b9193 (diff) | |
download | poi-b6aee1ef6d3e92a28ffd4b5c03e677b63b43747f.tar.gz poi-b6aee1ef6d3e92a28ffd4b5c03e677b63b43747f.zip |
65206 - Migrate ant / maven to gradle build
compile / jar / test of mrJars
don't include ants build.xml anymore
rename directories to match project and maven artifact names
refactor artifacts - so each project has one artifact
replace static references in hssf/dev tests with junit5 constructs, which had problems in parallel tests
increase gradle heap to 4gb because of OOM - maybe less would also work
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1888488 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'excelant/src/test/resources')
-rw-r--r-- | excelant/src/test/resources/tests.xml | 226 |
1 files changed, 0 insertions, 226 deletions
diff --git a/excelant/src/test/resources/tests.xml b/excelant/src/test/resources/tests.xml deleted file mode 100644 index 0882195551..0000000000 --- a/excelant/src/test/resources/tests.xml +++ /dev/null @@ -1,226 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes"?> -<!-- -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 - -Unless required by applicable law or agreed to in writing, -software distributed under the License is distributed on an -"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY -KIND, either express or implied. See the License for the -specific language governing permissions and limitations -under the License. ---> -<project name="excelant-tests" basedir="." xmlns:poi="antlib:org.apache.poi.ss.excelant"> - - <path id="excelant.classpath"> - <pathelement location="build/classes"/> - <pathelement location="build/ooxml-classes"/> - <pathelement location="build/excelant-classes"/> - <pathelement location="build/excelant-test-classes"/> <!-- test udf is in the test classes --> - </path> - - <typedef resource="org/apache/poi/ss/excelant/antlib.xml" - classpathref="excelant.classpath" - uri="antlib:org.apache.poi.ss.excelant"/> - - <!-- Should fail because the fileName attribute is missing --> - <target name="test-nofile"> - <poi:excelant> - - </poi:excelant> - </target> - - <!-- Should fail because the specified file is invalid --> - <target name="test-filenotfound"> - <poi:excelant fileName="invalid.xls"> - - </poi:excelant> - </target> - - <!-- basic evaluation test --> - <target name="test-evaluate"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:test showSuccessDetails="true"> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-4" /> - </poi:test> - </poi:excelant> - </target> - - <target name="test-evaluate-nodetails"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:test showSuccessDetails="false"> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-4" /> - </poi:test> - </poi:excelant> - </target> - - <target name="test-precision"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:precision value="1.0E-4"/> - - <poi:test name="global-precision" showFailureDetail="true" showSuccessDetails="true"> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149"/> - </poi:test> - - <poi:test name="custom-precision" showFailureDetail="true" showSuccessDetails="true"> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-5"/> - </poi:test> - - <poi:test name="tiny-precision" showFailureDetail="true" showSuccessDetails="true"> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-10"/> - </poi:test> - - </poi:excelant> - </target> - - <target name="test-precision-fails"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:precision value="1.0E-4"/> - - <poi:test name="tiny-precision" showFailureDetail="true" showSuccessDetails="true"> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-10" requiredToPass="true"/> - </poi:test> - - </poi:excelant> - </target> - - <!-- - By default ExcelAnt does not terminate execution if an error occurs - --> - <target name="test-passonerror"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - - <poi:test name="failonerror" showFailureDetail="true" showSuccessDetails="true"> - <poi:setDouble cell="'MortageCalculatorFunction'!$D$1" value="1"/> - <poi:setDouble cell="'MortageCalculatorFunction'!$D$2" value="2"/> - <poi:setFormula cell="'MortageCalculatorFunction'!$D$3" value ="SUM(D1:D2)"/> - <poi:evaluate showDelta="true" cell="'MortageCalculatorFunction'!$D$3" expectedValue="2"/> - </poi:test> - - </poi:excelant> - </target> - - <!-- - failOnError="true" forces ExcelAnt tot terminate execution if an error occurs - --> - <target name="test-failonerror"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls" failOnError="true"> - - <poi:test name="failonerror" showFailureDetail="true" showSuccessDetails="true"> - <poi:setDouble cell="'MortageCalculatorFunction'!$D$1" value="1"/> - <poi:setDouble cell="'MortageCalculatorFunction'!$D$2" value="2"/> - <poi:setFormula cell="'MortageCalculatorFunction'!$D$3" value ="SUM(D1:D2)"/> - <poi:evaluate showDelta="true" cell="'MortageCalculatorFunction'!$D$3" expectedValue="2"/> - </poi:test> - - </poi:excelant> - </target> - - <target name="test-failonerror-notdetails"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls" failOnError="true"> - - <poi:test name="failonerror" showFailureDetail="false" showSuccessDetails="false"> - <poi:setDouble cell="'MortageCalculatorFunction'!$D$1" value="1"/> - <poi:setDouble cell="'MortageCalculatorFunction'!$D$2" value="2"/> - <poi:setFormula cell="'MortageCalculatorFunction'!$D$3" value ="SUM(D1:D2)"/> - <poi:evaluate showDelta="true" cell="'MortageCalculatorFunction'!$D$3" expectedValue="2"/> - </poi:test> - - </poi:excelant> - </target> - - <!-- Evaluation of user-defined functions --> - <target name="test-udf"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:udf functionAlias="calculatePayment" - className="org.apache.poi.ss.excelant.CalculateMortgageFunction"/> - <poi:test> - <poi:setDouble cell="'MortageCalculatorFunction'!$B$1" value="240000"/> - <poi:setDouble cell="'MortageCalculatorFunction'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortageCalculatorFunction'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortageCalculatorFunction'!$B$4" - expectedValue="2285.576149" precision="1.0E-4" /> - </poi:test> - </poi:excelant> - </target> - - <!-- basic evaluation test --> - <target name="test-settext"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:test showSuccessDetails="true"> - <poi:setString cell="'MortgageCalculator'!$B$1" value="sometext"/> - <!-- How can we evaluate text? --> - </poi:test> - </poi:excelant> - </target> - - <target name="test-addhandler"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:test showSuccessDetails="true"> - <poi:handler className="org.apache.poi.ss.excelant.MockExcelAntWorkbookHandler"/> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-4" /> - </poi:test> - </poi:excelant> - </target> - - <target name="test-addhandler-wrongclass"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:test showSuccessDetails="true"> - <poi:handler className="java.lang.String"/> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-4" /> - </poi:test> - </poi:excelant> - </target> - - <target name="test-addhandler-fails"> - <poi:excelant fileName="${data.dir.name}/spreadsheet/excelant.xls"> - <poi:test showSuccessDetails="true"> - <poi:handler/> - <poi:setDouble cell="'MortgageCalculator'!$B$1" value="240000"/> - <poi:setDouble cell="'MortgageCalculator'!$B$2" value ="0.11"/> - <poi:setDouble cell="'MortgageCalculator'!$B$3" value ="30"/> - <poi:evaluate showDelta="true" cell="'MortgageCalculator'!$B$4" - expectedValue="2285.576149" precision="1.0E-4" /> - </poi:test> - </poi:excelant> - </target> -</project> |