File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -81,6 +81,19 @@ describe("time helper functions", function () {
8181 ) ;
8282 } ) ;
8383
84+ /**
85+ * Test if addition works correctly.
86+ */
87+ describe ( "add time value" , function ( ) {
88+ expect ( TimeValue . forever ( ) . add ( TimeValue . forever ( ) ) ) . toEqual ( TimeValue . forever ( ) ) ;
89+ expect ( TimeValue . forever ( ) . add ( TimeValue . never ( ) ) ) . toEqual ( TimeValue . zero ( ) ) ;
90+ expect ( TimeValue . forever ( ) . add ( TimeValue . sec ( 1 ) ) ) . toEqual ( TimeValue . forever ( ) ) ;
91+ expect ( TimeValue . never ( ) . add ( TimeValue . never ( ) ) ) . toEqual ( TimeValue . never ( ) ) ;
92+ expect ( TimeValue . never ( ) . add ( TimeValue . forever ( ) ) ) . toEqual ( TimeValue . zero ( ) ) ;
93+ expect ( TimeValue . never ( ) . add ( TimeValue . sec ( 1 ) ) ) . toEqual ( TimeValue . never ( ) ) ;
94+ } ) ;
95+
96+
8497 /**
8598 * Test conversion to string
8699 */
You can’t perform that action at this time.
0 commit comments