diff options
| author | Sébastien Dailly <sebastien@chimrod.com> | 2017-10-31 16:07:04 +0100 | 
|---|---|---|
| committer | Sébastien Dailly <sebastien@chimrod.com> | 2017-10-31 16:07:04 +0100 | 
| commit | ab721136f50914a21f6cca89f0fcfb055ba58cd2 (patch) | |
| tree | 60f788e3e8733a6d3606e801bc21a24e419e070e /tests/odf | |
| parent | db627ca2cfc745bbf2e489251e64054ab2b3bff9 (diff) | |
| parent | d8ed0babfa1c03c8f1968443a465972bb3bf460c (diff) | |
Update ScTypes.types with types used in evaluator
Diffstat (limited to 'tests/odf')
| -rwxr-xr-x | tests/odf/odf_ExpressionParser_test.ml | 11 | 
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
  | 
