This is an automated email from the ASF dual-hosted git repository. jimjag pushed a commit to branch openformula in repository https://gitbox.apache.org/repos/asf/openoffice.git
commit bc3f0884cc931bf540936848dfe841e595116044 Author: Jim Jagielski <[email protected]> AuthorDate: Fri Nov 13 08:48:34 2026 -0500 test/odf-validate: fix the ODF 1.4 calcval cases and add Small Group cases Drop repeated cases, mark the INDEX row-vector case as a kept deviation, and add basic limits, syntax, operator and conversion cases with values from the ODF 1.4 Part 4 text, plus a guard for the 255-argument cap. This should complete things for this initial phase. --- test/odf-validate/calcval-cases14.tsv | 64 +++++++++++++++++++++++++++++------ 1 file changed, 53 insertions(+), 11 deletions(-) diff --git a/test/odf-validate/calcval-cases14.tsv b/test/odf-validate/calcval-cases14.tsv index da4e7cb0b5..6f9aa8a418 100644 --- a/test/odf-validate/calcval-cases14.tsv +++ b/test/odf-validate/calcval-cases14.tsv @@ -36,7 +36,7 @@ NPER.paytype1 =NPER(0.01;-100;1000;0;1)-NPER(0.01;-100;1000;0;0) cell - 6.12.29 INDEX.col.row =INDEX(D1:D5;2) cell 20 6.14.6 column vector, Row only: the entire row of the area INDEX.col.rowcol =INDEX(D1:D5;2;1) cell 20 6.14.6 column vector, Row and Column INDEX.row.col =INDEX(D1:F1;1;3) cell 101 6.14.6 row vector, Row and Column -INDEX.row.rowonly =INDEX(H1:L1;3) cell #ERR 6.14.6 (1.4) row vector with Row = 3 > 1 row: an Error; 1.3 let Row act as the column offset +INDEX.row.rowonly =INDEX(H1:L1;3) cell #ERR KNOWN DEVIATION, kept on purpose: AOO returns the third column (30) as other spreadsheets do; 6.14.6 (1.4) row vector with Row = 3 > 1 row: an Error; 1.3 let Row act as the column offset INDEX.row.empty =INDEX(H1:L1;;3) cell 30 6.14.6 row vector, Column only INDEX.col.beyond =INDEX(D1:D5;2;2) cell #ERR 6.14.6 Column greater than the dimension of the area is an Error ISBLANK.err =ISBLANK(NA()) cell 0 6.13.14 an Error argument returns FALSE @@ -119,9 +119,9 @@ BITRSHIFT.maxval =BITRSHIFT(281474976710655;0) cell 281474976710655 6.6.1 max un BITRSHIFT.ovr2 =BITRSHIFT(281474976710656;1) cell #ERR 6.6.1 operand 2^48 is beyond the allowed range INDEX.array =INDEX({10;20|30;40|50;60};3;1) cell 50 6.14.6 array (matrix) input, row and column IFNA.num =IFNA(5;10) cell 5 6.x first argument not #N/A, returned unchanged -IFNA.text =IFNA("hello";"world") cell hello 6.x first argument text, returned unchanged +IFNA.text =IFNA("hello";"world") cell s:hello 6.x first argument text, returned unchanged IFNA.na.num =IFNA(NA();10) cell 10 6.x first argument #N/A, fallback numeric returned -IFNA.na.text =IFNA(NA();"fallback") cell fallback 6.x first argument #N/A, fallback text returned +IFNA.na.text =IFNA(NA();"fallback") cell s:fallback 6.x first argument #N/A, fallback text returned IFNA.otherr =IFNA(1/0;10) cell #ERR 6.x non-#N/A error propagated, fallback not evaluated IFNA.lazy.ok =IFNA(5;1/0) cell 5 6.x fallback not evaluated when first argument is not #N/A IFNA.lazy.err =IFNA(NA();1/0) cell #ERR 6.x fallback evaluated when first argument is #N/A @@ -134,13 +134,13 @@ SKEWP.one =SKEWP(5) cell #ERR 6.x single observation, zero variance SKEWP.zero =SKEWP(5;5;5) cell #ERR 6.x constant dataset, zero variance SKEWP.range =SKEWP(D1:D3) cell 0 6.x numeric range input (D1:D3 = 10,20,30, symmetric) SKEWP.array =SKEWP({1;1;2}) cell 0.7071067812 6.x array/matrix input -SKEWP.mixed =SKEWP(1;"text";2) cell 0 6.x text skipped, {1,2} is symmetric +SKEWP.mixed =SKEWP(1;"text";2) cell - 6.3.7 a direct Text argument converts as in 6.3.5, implementation-defined (0 or an Error); AOO returns an Error SKEWP.err =SKEWP(1/0) cell #ERR 6.x error value propagates IFNA.ref =IFNA(D1;10) cell 10 6.x cell reference containing a value (D1 = 10), returned unchanged -IFNA.ref.text =IFNA(A1;10) cell y 6.x cell reference containing text (A1 = y), returned unchanged +IFNA.ref.text =IFNA(A1;10) cell s:y 6.x cell reference containing text (A1 = y), returned unchanged IFNA.range =IFNA(D1:D3;99) cell 10 6.x range reference, implicit intersection takes first cell (D1 = 10) SKEWP.two =SKEWP(1;2) cell 0 6.x two observations, non-constant, zero skewness -SKEW.text =SKEW(1;"text";2) cell 0 6.x regression: direct scalar text skipped, {1,2} symmetric +SKEW.text =SKEW(1;"text";2) cell - 6.3.7 a direct Text argument converts as in 6.3.5, implementation-defined (0 or an Error); AOO returns an Error SKEW.err =SKEW(1/0) cell #ERR 6.x regression: error argument propagates COUNTA.range =COUNTA(D1:D3) cell 3 6.13.7 COUNTA over numeric range (D1:D3=10,20,30) COUNTA.empty =COUNTA(D6:D7) cell 0 6.13.7 COUNTA: truly empty cells are not counted (D6:D7 unset) @@ -149,9 +149,51 @@ COUNTBLANK.range =COUNTBLANK(D1:D3) cell 0 6.13.8 COUNTBLANK over range with no COUNTBLANK.empty =COUNTBLANK(D6:D7) cell 2 6.13.8 COUNTBLANK: truly empty cells are counted (D6:D7 unset) DATE.pre1583 =DATE(1500;1;1) cell #ERR 6.10.2 DATE(1500;1;1) outside constraints (Year>=1904); impl-defined/diagnostic per ODF 1.4 — NOT mandatory #ERR. THIS CALCVAL ASSERTION IS AOO-SPECIFIC DIAGNOSTIC ONLY (observed #VALUE!), not an ODF conformance assertion. SYN-001-criteria =DCOUNT(R1:T6;;V1:V2) cell 4 6.x Criteria syntax §4.11.11 via DCOUNT against existing R1:T6 database and V1:V2 criteria fixtures (Age>=30 → B,C,D,E) -INDEX.rowvec.single =INDEX(H1:L1;3) cell #ERR 6.14.6 INDEX row vector single arg: ODF 1.4 error (Milestone A fix) -INDEX.rowvec.colarg =INDEX(H1:L1;;3) cell 30 6.14.6 INDEX row vector with column arg only (col 3 of H1:L1=10,20,30,40,50) -INDEX.row.outrange =INDEX(D1:D5;6) cell #ERR 6.14.6 INDEX row out of range -BITLSHIFT.neg =BITLSHIFT(8;-1) cell 4 6.6.3 BITLSHIFT negative shift count reverses direction -BITRSHIFT.neg =BITRSHIFT(8;-1) cell 16 6.6.5 BITRSHIFT negative shift count reverses direction BITAND.3params =BITAND(6;3;1) cell #ERR 6.6.2 BITAND exactly 2 params enforced + +# OpenFormula Small Group: basic limits, syntax, operators and conversions (ODF 1.4 Part 4 sections 3.7, 5, 6.3, 6.4). +SG.BL-001-1024chars =1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1+1 [...] +SG.BL-002-30params =MAX(1;2;3;4;5;6;7;8;9;10;11;12;13;14;15;16;17;18;19;20;21;22;23;24;25;26;27;28;29;30) cell 30 3.7 basic limits: 30 parameters in one function call +SG.BL-003-32767chars =LEN(REPT("a";32767)) cell 32767 3.7 basic limits: a string of 32,767 ASCII characters +SG.BL-004-7nesting =IF(TRUE;IF(TRUE;IF(TRUE;IF(TRUE;IF(TRUE;IF(TRUE;IF(TRUE;1;2);2);2);2);2);2);2) cell 1 3.7 basic limits: 7 nesting levels of functions +SG.BL-stack-518 =SUM(1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;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1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1 [...] +SG.BL-256args =SUM(1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1;1 [...] +SG.SYN-002-parens =(2+3)*4 cell 20 5.5 Note 3: parentheses override precedence +SG.SYN-003-decimal =1.5 cell 1.5 5.3 decimal number literal +SG.SYN-003-sci =1.5e2 cell 150 5.3 number literal with exponent +SG.SYN-004-string ="hello" cell s:hello 5.4 string literal +SG.SYN-004-quote ="he said ""hi""" cell s:he said "hi" 5.4 doubled quote inside a string literal +SG.SYN-005-precedence =2+3*4 cell 14 5.5 Table 1: * before + +SG.SYN-005-power =2^3^2 cell 64 5.5 Note 1: ^ is left-associative, (2^3)^2 +SG.SYN-005-negpow =-2^2 cell 4 5.5 Note 1: prefix - binds tighter than ^, (-2)^2 +SG.SYN-006-func =ABS(-5) cell 5 5.6 function call +SG.SYN-007-nonstandard =NONEXISTENT() cell #ERR 5.7 unknown function name is an error +SG.SYN-008-ref =D1 cell 10 5.8 cell reference (D1 = 10) +SG.SYN-008-range =SUM(D1:D3) cell 60 5.8 and 6.4.11 range reference (D1:D3 = 10,20,30) +SG.SYN-010-error =NA() cell #N/A 6.13.27 NA() is #N/A +SG.SYN-011-whitespace =2 + 3 * 4 cell 14 5.14 whitespace around operators is ignored +SG.OP-001-lt =1<2 cell 1 6.4.9 less than (TRUE) +SG.OP-001-le =2<=2 cell 1 6.4.9 less than or equal (TRUE) +SG.OP-001-gt =3>2 cell 1 6.4.9 greater than (TRUE) +SG.OP-001-ge =2>=2 cell 1 6.4.9 greater than or equal (TRUE) +SG.OP-002-concat ="a"&"b" cell s:ab 6.4.10 string concatenation +SG.OP-003-add =2+3 cell 5 6.4.2 addition +SG.OP-004-sub =5-3 cell 2 6.4.3 subtraction +SG.OP-005-mul =2*3 cell 6 6.4.4 multiplication +SG.OP-006-div =6/3 cell 2 6.4.5 division +SG.OP-006-div0 =1/0 cell #ERR 6.4.5 division by zero is an error +SG.OP-007-pow =2^3 cell 8 6.4.6 power +SG.OP-008-eq =2=2 cell 1 6.4.7 equal (TRUE) +SG.OP-009-ne =2<>3 cell 1 6.4.8 not equal (TRUE) +SG.OP-010-pct =50% cell 0.5 6.4.14 postfix % divides by 100 +SG.OP-011-pos =+5 cell 5 6.4.15 prefix + +SG.OP-012-neg =-5 cell -5 6.4.16 prefix - +SG.OP-013-intersect =SUM(D1:F3!E1:F2) cell 336 6.4.12 reference intersection D1:F3!E1:F2 is E1:F2 (11,101,22,202) +SG.CONV-001-text =TEXT(123;"0") cell s:123 6.20.23 TEXT of a number +SG.CONV-002-number =VALUE("123") cell 123 6.13.34 VALUE of a Text +SG.CONV-003-ref =N(D1) cell 10 6.13.26 N dereferences a Reference to a scalar (D1 = 10) +SG.CONV-004-logical =N(TRUE()) cell 1 6.13.26 N of TRUE is 1 +SG.CONV-004-logical2 =IF(0;TRUE();FALSE()) cell 0 6.3.12 the Number 0 converts to FALSE +SG.CONV-005-error =ISERR(1/0) cell 1 6.13.15 ISERR of a division by zero (TRUE)
