@@ -173,18 +173,53 @@ describe('filter transforms calc:', function() {
173
173
} ]
174
174
} ) ] ) ;
175
175
176
- _assert (
177
- out ,
176
+ _assert ( out ,
178
177
[ - 1 , 0 , 1 ] ,
179
178
[ 2 , 1 , 2 ] ,
180
179
[ 0.2 , 0.1 , 0.2 ]
181
180
) ;
182
181
} ) ;
183
182
183
+ it ( '+ *within* + with RHS open' , function ( ) {
184
+ var out = _transform ( [ Lib . extendDeep ( { } , _base , {
185
+ transforms : [ {
186
+ operation : '[)' ,
187
+ value : [ - 1 , 1 ] ,
188
+ filtersrc : 'x'
189
+ } ]
190
+ } ) ] ) ;
191
+
192
+ _assert ( out , [ - 1 , 0 ] , [ 2 , 1 ] , [ 0.2 , 0.1 ] ) ;
193
+ } ) ;
194
+
195
+ it ( '+ *within* + with LHS open' , function ( ) {
196
+ var out = _transform ( [ Lib . extendDeep ( { } , _base , {
197
+ transforms : [ {
198
+ operation : '(]' ,
199
+ value : [ - 1 , 1 ] ,
200
+ filtersrc : 'x'
201
+ } ]
202
+ } ) ] ) ;
203
+
204
+ _assert ( out , [ 0 , 1 ] , [ 1 , 2 ] , [ 0.1 , 0.2 ] ) ;
205
+ } ) ;
206
+
207
+ it ( '+ *within* + with both sides open' , function ( ) {
208
+ var out = _transform ( [ Lib . extendDeep ( { } , _base , {
209
+ transforms : [ {
210
+ operation : '()' ,
211
+ value : [ - 1 , 1 ] ,
212
+ filtersrc : 'x'
213
+ } ]
214
+ } ) ] ) ;
215
+
216
+ _assert ( out , [ 0 ] , [ 1 ] , [ 0.1 ] ) ;
217
+ } ) ;
218
+
184
219
it ( '+ *notwithin*' , function ( ) {
185
220
var out = _transform ( [ Lib . extendDeep ( { } , _base , {
186
221
transforms : [ {
187
- operation : '][ ' ,
222
+ operation : ')( ' ,
188
223
value : [ - 1 , 1 ] ,
189
224
filtersrc : 'x'
190
225
} ]
@@ -197,6 +232,54 @@ describe('filter transforms calc:', function() {
197
232
) ;
198
233
} ) ;
199
234
235
+ it ( '+ *notwithin* with RHS closed' , function ( ) {
236
+ var out = _transform ( [ Lib . extendDeep ( { } , _base , {
237
+ transforms : [ {
238
+ operation : ')[' ,
239
+ value : [ - 1 , 1 ] ,
240
+ filtersrc : 'x'
241
+ } ]
242
+ } ) ] ) ;
243
+
244
+ _assert ( out ,
245
+ [ - 2 , - 2 , 1 , 2 , 3 ] ,
246
+ [ 1 , 3 , 2 , 3 , 1 ] ,
247
+ [ 0.1 , 0.3 , 0.2 , 0.3 , 0.4 ]
248
+ ) ;
249
+ } ) ;
250
+
251
+ it ( '+ *notwithin* with LHS closed' , function ( ) {
252
+ var out = _transform ( [ Lib . extendDeep ( { } , _base , {
253
+ transforms : [ {
254
+ operation : '](' ,
255
+ value : [ - 1 , 1 ] ,
256
+ filtersrc : 'x'
257
+ } ]
258
+ } ) ] ) ;
259
+
260
+ _assert ( out ,
261
+ [ - 2 , - 1 , - 2 , 2 , 3 ] ,
262
+ [ 1 , 2 , 3 , 3 , 1 ] ,
263
+ [ 0.1 , 0.2 , 0.3 , 0.3 , 0.4 ]
264
+ ) ;
265
+ } ) ;
266
+
267
+ it ( '+ *notwithin* with both sides closed' , function ( ) {
268
+ var out = _transform ( [ Lib . extendDeep ( { } , _base , {
269
+ transforms : [ {
270
+ operation : '][' ,
271
+ value : [ - 1 , 1 ] ,
272
+ filtersrc : 'x'
273
+ } ]
274
+ } ) ] ) ;
275
+
276
+ _assert ( out ,
277
+ [ - 2 , - 1 , - 2 , 1 , 2 , 3 ] ,
278
+ [ 1 , 2 , 3 , 2 , 3 , 1 ] ,
279
+ [ 0.1 , 0.2 , 0.3 , 0.2 , 0.3 , 0.4 ]
280
+ ) ;
281
+ } ) ;
282
+
200
283
it ( '+ *in*' , function ( ) {
201
284
var out = _transform ( [ Lib . extendDeep ( { } , _base , {
202
285
transforms : [ {
@@ -279,7 +362,7 @@ describe('filter transforms calc:', function() {
279
362
it ( '+ *notwithin*' , function ( ) {
280
363
var out = _transform ( [ Lib . extendDeep ( { } , _base , {
281
364
transforms : [ {
282
- operation : '][ ' ,
365
+ operation : ')( ' ,
283
366
value : [ 'a' , 'c' ] ,
284
367
filtersrc : 'x'
285
368
} ]
@@ -389,7 +472,7 @@ describe('filter transforms calc:', function() {
389
472
it ( '+ *notwithin*' , function ( ) {
390
473
var out = _transform ( [ Lib . extendDeep ( { } , _base , {
391
474
transforms : [ {
392
- operation : '][ ' ,
475
+ operation : ')( ' ,
393
476
value : [ '2016-08-01' , '2016-10-01' ] ,
394
477
filtersrc : 'x'
395
478
} ]
0 commit comments