aboutsummaryrefslogtreecommitdiff
path: root/tests/odf
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@chimrod.com>2017-10-25 14:50:32 +0200
committerSébastien Dailly <sebastien@chimrod.com>2017-10-31 16:02:40 +0100
commit01d7f77f65c3a2b83978b1f00c87b54f00647816 (patch)
tree32a83b8c529b0bc10917520918a49774ed32be9a /tests/odf
parent85231845871c841089308c9bc92569d36cb548db (diff)
Update sheet traversal
Diffstat (limited to 'tests/odf')
-rwxr-xr-xtests/odf/odf_ExpressionParser_test.ml11
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/odf/odf_ExpressionParser_test.ml b/tests/odf/odf_ExpressionParser_test.ml
index 2cdb3bb..becf9ab 100755
--- a/tests/odf/odf_ExpressionParser_test.ml
+++ b/tests/odf/odf_ExpressionParser_test.ml
@@ -13,6 +13,13 @@ let _msg ~(expected:ScTypes.expression) ~(result:ScTypes.expression) =
(UTF8.raw_encode @@ UTF8.Buffer.contents b2)
+
+let build_num value = ScTypes.Num (
+ ScTypes.Number,
+ DataType.Num.of_num @@ Num.num_of_int value
+)
+
+
let test_formula ctx = begin
let test1 = "of:=CONCATENATE(SUM([.F16:.AJ16]);\"/\";8*NETWORKDAYS([.F6]; [.F6]+(ORG.OPENOFFICE.DAYSINMONTH([.F6])-1)))" in
@@ -27,7 +34,7 @@ let test_formula ctx = begin
Ref (Range (((6, 16), (false, false)), (((36, 16), (false, false)))))]);
Value (Str (u"/"));
Call(u"*", [
- Value (Num ((Num.num_of_int 8, Some (u"8"))));
+ Value (build_num 8);
Call(u"NETWORKDAYS", [
Ref (Cell ((6, 6), (false, false)));
Call(u"+", [
@@ -36,7 +43,7 @@ let test_formula ctx = begin
Call( u"-", [
Call(u"ORG.OPENOFFICE.DAYSINMONTH", [
Ref (Cell ((6, 6), (false, false)))]);
- Value (Num ((Num.num_of_int 1, Some (u"1"))));
+ Value (build_num 1);
]))])])])])) in
assert_equal