sc/qa/unit/data/functions/mathematical/fods/rounddown.fods |   77 ++++++++++---
 sc/qa/unit/data/functions/mathematical/fods/roundsig.fods  |   50 ++++++--
 sc/qa/unit/data/functions/mathematical/fods/roundup.fods   |   77 ++++++++++---
 3 files changed, 162 insertions(+), 42 deletions(-)

New commits:
commit a062bceb2509d227cec86845af680a4b69d42df3
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Sat Apr 15 18:53:20 2023 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Sat Apr 15 21:14:35 2023 +0200

    Add ROUNDSIG samples to unit test, tdf#138220 tdf#105931
    
    Change-Id: I0bab920c78ff6d02382b9a314982a2f3d436b35a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150442
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods 
b/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods
index 865662523ff7..148cd2cb648f 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/roundsig.fods
@@ -4605,12 +4605,27 @@
      <table:table-cell table:style-name="ce70"/>
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
-    <table:table-row table:style-name="ro6" table:number-rows-repeated="3">
-     <table:table-cell table:style-name="ce70"/>
+    <table:table-row table:style-name="ro2">
+     <table:table-cell 
table:formula="of:=ORG.LIBREOFFICE.ROUNDSIG([.F27];[.G27])" 
office:value-type="float" office:value="-999.13" calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="-999.13" 
calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce92" 
table:formula="of:=[.A27]=[.B27]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A27])" 
office:value-type="string" office:string-value="=ROUNDSIG(F27;G27)" 
calcext:value-type="string">
+      <text:p>=ROUNDSIG(F27;G27)</text:p>
+     </table:table-cell>
      <table:table-cell/>
-     <table:table-cell table:style-name="ce73"/>
-     <table:table-cell table:style-name="ce75" 
table:number-columns-repeated="2"/>
-     <table:table-cell table:number-columns-repeated="6"/>
+     <table:table-cell office:value-type="float" office:value="-999.13" 
calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="12" 
calcext:value-type="float">
+      <text:p>12</text:p>
+     </table:table-cell>
+     <table:table-cell table:number-columns-repeated="4"/>
      <table:table-cell table:style-name="ce81"/>
      <table:table-cell/>
      <table:table-cell table:style-name="ce82"/>
@@ -4623,12 +4638,27 @@
      <table:table-cell table:style-name="ce70"/>
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
-    <table:table-row table:style-name="ro6" table:number-rows-repeated="3">
-     <table:table-cell table:style-name="ce70"/>
+    <table:table-row table:style-name="ro2">
+     <table:table-cell 
table:formula="of:=ORG.LIBREOFFICE.RAWSUBTRACT(ORG.LIBREOFFICE.ROUNDSIG([.F28];[.G28]);[.F28])"
 office:value-type="float" office:value="0" calcext:value-type="float">
+      <text:p>0</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="0" 
calcext:value-type="float">
+      <text:p>0</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce92" 
table:formula="of:=[.A28]=[.B28]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A28])" 
office:value-type="string" 
office:string-value="=RAWSUBTRACT(ROUNDSIG(F28;G28);F28)" 
calcext:value-type="string">
+      <text:p>=RAWSUBTRACT(ROUNDSIG(F28;G28);F28)</text:p>
+     </table:table-cell>
      <table:table-cell/>
-     <table:table-cell table:style-name="ce72"/>
-     <table:table-cell table:style-name="ce75" 
table:number-columns-repeated="2"/>
-     <table:table-cell table:number-columns-repeated="6"/>
+     <table:table-cell office:value-type="float" office:value="-999.13" 
calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="12" 
calcext:value-type="float">
+      <text:p>12</text:p>
+     </table:table-cell>
+     <table:table-cell table:number-columns-repeated="4"/>
      <table:table-cell table:style-name="ce81"/>
      <table:table-cell/>
      <table:table-cell table:style-name="ce82"/>
commit e68cd91651c53c5c228d84582b1062d8fb9a7077
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Sat Apr 15 18:34:55 2023 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Sat Apr 15 21:14:25 2023 +0200

    Add ROUND(DOWN|UP) samples to unit test, tdf#154792 tdf#124286 tdf#138220
    
    Change-Id: I20efab10041cee570bd0685bbd4da6077a71f1e6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150441
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins

diff --git a/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods 
b/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
index 8d4292810304..6022ba17c5be 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/rounddown.fods
@@ -2006,41 +2006,86 @@
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce29"/>
-     <table:table-cell table:style-name="ce38"/>
+     <table:table-cell table:formula="of:=ROUNDDOWN(726498.789999828;2)" 
office:value-type="float" office:value="726498.78" calcext:value-type="float">
+      <text:p>726498.78</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="726498.78" 
calcext:value-type="float">
+      <text:p>726498.78</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce30" 
table:formula="of:=[.A15]=[.B15]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A15])" 
office:value-type="string" office:string-value="=ROUNDDOWN(726498.789999828;2)" 
calcext:value-type="string">
+      <text:p>=ROUNDDOWN(726498.789999828;2)</text:p>
+     </table:table-cell>
      <table:table-cell table:style-name="ce42"/>
      <table:table-cell table:number-columns-repeated="4"/>
      <table:table-cell table:style-name="ce48"/>
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce29"/>
-     <table:table-cell table:style-name="ce38"/>
+     <table:table-cell table:formula="of:=ROUNDDOWN(2-5E-015;14)" 
office:value-type="float" office:value="1.99999999999999" 
calcext:value-type="float">
+      <text:p>1.99999999999999</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" 
office:value="1.99999999999999" calcext:value-type="float">
+      <text:p>1.99999999999999</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce30" 
table:formula="of:=[.A16]=[.B16]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A16])" 
office:value-type="string" office:string-value="=ROUNDDOWN(2-5E-015;14)" 
calcext:value-type="string">
+      <text:p>=ROUNDDOWN(2-5E-015;14)</text:p>
+     </table:table-cell>
      <table:table-cell table:number-columns-repeated="6"/>
      <table:table-cell table:style-name="ce49" 
table:number-columns-repeated="5"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce29"/>
-     <table:table-cell table:style-name="ce38"/>
+     <table:table-cell table:formula="of:=ROUNDDOWN(2-5E-015;13)" 
office:value-type="float" office:value="1.9999999999999" 
calcext:value-type="float">
+      <text:p>1.9999999999999</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" 
office:value="1.9999999999999" calcext:value-type="float">
+      <text:p>1.9999999999999</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce30" 
table:formula="of:=[.A17]=[.B17]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A17])" 
office:value-type="string" office:string-value="=ROUNDDOWN(2-5E-015;13)" 
calcext:value-type="string">
+      <text:p>=ROUNDDOWN(2-5E-015;13)</text:p>
+     </table:table-cell>
      <table:table-cell table:number-columns-repeated="11"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce31"/>
-     <table:table-cell/>
+     <table:table-cell table:formula="of:=ROUNDDOWN(8.234567890125;11)" 
office:value-type="float" office:value="8.23456789012" 
calcext:value-type="float">
+      <text:p>8.23456789012</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="8.23456789012" 
calcext:value-type="float">
+      <text:p>8.23456789012</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce30" 
table:formula="of:=[.A18]=[.B18]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A18])" 
office:value-type="string" office:string-value="=ROUNDDOWN(8.234567890125;11)" 
calcext:value-type="string">
+      <text:p>=ROUNDDOWN(8.234567890125;11)</text:p>
+     </table:table-cell>
      <table:table-cell table:style-name="ce43"/>
      <table:table-cell table:style-name="ce27" 
table:content-validation-name="val1"/>
      <table:table-cell table:number-columns-repeated="3"/>
      <table:table-cell table:style-name="ce49"/>
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
-    <table:table-row table:style-name="ro5">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce31"/>
-     <table:table-cell table:style-name="ce39"/>
+    <table:table-row table:style-name="ro2">
+     <table:table-cell table:formula="of:=ROUNDDOWN(-999.13;11)" 
office:value-type="float" office:value="-999.13" calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="-999.13" 
calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce30" 
table:formula="of:=[.A19]=[.B19]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A19])" 
office:value-type="string" office:string-value="=ROUNDDOWN(-999.13;11)" 
calcext:value-type="string">
+      <text:p>=ROUNDDOWN(-999.13;11)</text:p>
+     </table:table-cell>
      <table:table-cell table:number-columns-repeated="6"/>
      <table:table-cell table:style-name="ce49" 
table:number-columns-repeated="4"/>
      <table:table-cell/>
diff --git a/sc/qa/unit/data/functions/mathematical/fods/roundup.fods 
b/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
index 2bfba0d91fa3..f549a1444c4d 100644
--- a/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
+++ b/sc/qa/unit/data/functions/mathematical/fods/roundup.fods
@@ -1958,41 +1958,86 @@
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce13"/>
-     <table:table-cell table:style-name="ce22"/>
+     <table:table-cell table:formula="of:=ROUNDUP(2+1E-015;14)" 
office:value-type="float" office:value="2.00000000000001" 
calcext:value-type="float">
+      <text:p>2.00000000000001</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" 
office:value="2.00000000000001" calcext:value-type="float">
+      <text:p>2.00000000000001</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce14" 
table:formula="of:=[.A15]=[.B15]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A15])" 
office:value-type="string" office:string-value="=ROUNDUP(2+1E-015;14)" 
calcext:value-type="string">
+      <text:p>=ROUNDUP(2+1E-015;14)</text:p>
+     </table:table-cell>
      <table:table-cell table:style-name="ce26"/>
      <table:table-cell table:number-columns-repeated="4"/>
      <table:table-cell table:style-name="ce32"/>
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce13"/>
-     <table:table-cell table:style-name="ce22"/>
+     <table:table-cell table:formula="of:=ROUNDUP(2+1E-015;13)" 
office:value-type="float" office:value="2.0000000000001" 
calcext:value-type="float">
+      <text:p>2.0000000000001</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" 
office:value="2.0000000000001" calcext:value-type="float">
+      <text:p>2.0000000000001</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce14" 
table:formula="of:=[.A16]=[.B16]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A16])" 
office:value-type="string" office:string-value="=ROUNDUP(2+1E-015;13)" 
calcext:value-type="string">
+      <text:p>=ROUNDUP(2+1E-015;13)</text:p>
+     </table:table-cell>
      <table:table-cell table:number-columns-repeated="6"/>
      <table:table-cell table:style-name="ce33" 
table:number-columns-repeated="5"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce13"/>
-     <table:table-cell table:style-name="ce22"/>
+     <table:table-cell table:formula="of:=ROUNDUP(8.234567890134;11)" 
office:value-type="float" office:value="8.23456789013" 
calcext:value-type="float">
+      <text:p>8.23456789013</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="8.23456789013" 
calcext:value-type="float">
+      <text:p>8.23456789013</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce14" 
table:formula="of:=[.A17]=[.B17]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A17])" 
office:value-type="string" office:string-value="=ROUNDUP(8.234567890134;11)" 
calcext:value-type="string">
+      <text:p>=ROUNDUP(8.234567890134;11)</text:p>
+     </table:table-cell>
      <table:table-cell table:number-columns-repeated="11"/>
     </table:table-row>
     <table:table-row table:style-name="ro2">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce15"/>
-     <table:table-cell/>
+     <table:table-cell table:formula="of:=ROUNDUP(-999.13;11)" 
office:value-type="float" office:value="-999.13" calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" office:value="-999.13" 
calcext:value-type="float">
+      <text:p>-999.13</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce14" 
table:formula="of:=[.A18]=[.B18]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A18])" 
office:value-type="string" office:string-value="=ROUNDUP(-999.13;11)" 
calcext:value-type="string">
+      <text:p>=ROUNDUP(-999.13;11)</text:p>
+     </table:table-cell>
      <table:table-cell table:style-name="ce27"/>
      <table:table-cell table:style-name="ce11" 
table:content-validation-name="val1"/>
      <table:table-cell table:number-columns-repeated="3"/>
      <table:table-cell table:style-name="ce33"/>
      <table:table-cell table:number-columns-repeated="5"/>
     </table:table-row>
-    <table:table-row table:style-name="ro5">
-     <table:table-cell table:number-columns-repeated="2"/>
-     <table:table-cell table:style-name="ce15"/>
-     <table:table-cell table:style-name="ce23"/>
+    <table:table-row table:style-name="ro2">
+     <table:table-cell table:formula="of:=ROUNDUP(8000000000000000;-15)" 
office:value-type="float" office:value="8000000000000000" 
calcext:value-type="float">
+      <text:p>8000000000000000</text:p>
+     </table:table-cell>
+     <table:table-cell office:value-type="float" 
office:value="8000000000000000" calcext:value-type="float">
+      <text:p>8000000000000000</text:p>
+     </table:table-cell>
+     <table:table-cell table:style-name="ce14" 
table:formula="of:=[.A19]=[.B19]" office:value-type="boolean" 
office:boolean-value="true" calcext:value-type="boolean">
+      <text:p>TRUE</text:p>
+     </table:table-cell>
+     <table:table-cell table:formula="of:=FORMULA([.A19])" 
office:value-type="string" office:string-value="=ROUNDUP(8000000000000000;-15)" 
calcext:value-type="string">
+      <text:p>=ROUNDUP(8000000000000000;-15)</text:p>
+     </table:table-cell>
      <table:table-cell table:number-columns-repeated="6"/>
      <table:table-cell table:style-name="ce33" 
table:number-columns-repeated="4"/>
      <table:table-cell/>

Reply via email to