@@ -948,16 +948,26 @@ func TestCalcProps(t *testing.T) {
948
948
)
949
949
assert .True (t , ret .Get ("error" ).IsNull ())
950
950
951
+ ret = f .(js.Value ).Call ("GetCalcProps" )
952
+ assert .True (t , ret .Get ("error" ).IsNull (), ret .Get ("error" ).String ())
953
+ assert .True (t , ret .Get ("props" ).Get ("FullCalcOnLoad" ).Bool ())
954
+ assert .Equal (t , 122211 , ret .Get ("props" ).Get ("CalcID" ).Int ())
955
+ assert .Equal (t , 5 , ret .Get ("props" ).Get ("ConcurrentManualCount" ).Int ())
956
+ assert .Equal (t , 10 , ret .Get ("props" ).Get ("IterateCount" ).Int ())
957
+ assert .True (t , ret .Get ("props" ).Get ("ConcurrentCalc" ).Bool ())
958
+ assert .True (t , ret .Get ("props" ).Get ("ForceFullCalc" ).IsUndefined ())
959
+
960
+ ret = f .(js.Value ).Call ("GetCalcProps" , js .ValueOf (map [string ]interface {}{"CalcMode" : true }))
961
+ assert .EqualError (t , errArgNum , ret .Get ("error" ).String ())
962
+
951
963
ret = f .(js.Value ).Call ("SetCalcProps" , js .ValueOf (map [string ]interface {}{"RefMode" : "a1" }))
952
964
assert .Equal (t , "invalid RefMode value \" a1\" , acceptable value should be one of A1, R1C1" , ret .Get ("error" ).String ())
953
965
954
966
ret = f .(js.Value ).Call ("SetCalcProps" )
955
967
assert .EqualError (t , errArgNum , ret .Get ("error" ).String ())
956
968
957
969
ret = f .(js.Value ).Call ("SetCalcProps" ,
958
- js .ValueOf (map [string ]interface {}{
959
- "CalcMode" : true ,
960
- }),
970
+ js .ValueOf (map [string ]interface {}{"CalcMode" : true }),
961
971
)
962
972
assert .EqualError (t , errArgType , ret .Get ("error" ).String ())
963
973
}
0 commit comments