@@ -28,6 +28,8 @@ describe.sequential('Container Single Index Based Access', withShell(shell => {
2828 useConfigForTest ( { solver : { pointerTracking : true } } ) ;
2929
3030 describe ( 'Simple access' , ( ) => {
31+ useConfigForTest ( { solver : { pointerTracking : true } } ) ;
32+
3133 assertSliced (
3234 label ( 'Container with single argument' , basicCapabilities ) ,
3335 shell ,
@@ -51,6 +53,8 @@ print(${acc('numbers', 1)})`,
5153 } ) ;
5254
5355 describe ( 'Whole container access' , ( ) => {
56+ useConfigForTest ( { solver : { pointerTracking : true } } ) ;
57+
5458 assertSliced (
5559 label ( 'When each argument of a container is redefined, then original container is still in slice' , basicCapabilities ) ,
5660 shell ,
@@ -106,6 +110,8 @@ print(numbers)`
106110 } ) ;
107111
108112 describe ( 'Access with other accesses' , ( ) => {
113+ useConfigForTest ( { solver : { pointerTracking : true } } ) ;
114+
109115 assertSliced (
110116 label ( 'With other container' , basicCapabilities ) ,
111117 shell ,
@@ -132,6 +138,8 @@ print(${acc('numbers', 1)})`,
132138 } ) ;
133139
134140 describe ( 'Access with assignment' , ( ) => {
141+ useConfigForTest ( { solver : { pointerTracking : true } } ) ;
142+
135143 assertSliced (
136144 label ( 'When there is more than one assignment to the same index, then the last assignment is in the slice' , basicCapabilities ) ,
137145 shell ,
@@ -208,6 +216,7 @@ print(${acc('numbers', 1)})`
208216
209217 describe ( 'Config flag' , ( ) => {
210218 useConfigForTest ( { solver : { pointerTracking : false } } ) ;
219+
211220 assertSliced (
212221 label ( 'When flag is false, then container access is not in slice' , [ 'call-normal' ] ) ,
213222 shell ,
@@ -224,6 +233,8 @@ print(${acc('numbers', 1)})`
224233 } ) ;
225234
226235 describe ( 'Container assignment' , ( ) => {
236+ useConfigForTest ( { solver : { pointerTracking : true } } ) ;
237+
227238 assertSliced (
228239 label ( 'When container is self-redefined, then indices get passed' , basicCapabilities ) ,
229240 shell ,
@@ -311,12 +322,14 @@ print(numbers)`,
311322${ acc ( 'numbers' , 1 ) } <- 1
312323${ acc ( 'numbers' , 2 ) } <- 2
313324print(numbers)` ,
325+ undefined ,
326+ 'fail-both' ,
314327 ) ;
315328 } ) ;
316329
317330 describe . skipIf ( container !== ContainerType . List ) ( 'Nested Lists' , ( ) => {
318331 useConfigForTest ( { solver : { pointerTracking : true } } ) ;
319-
332+
320333 assertSliced (
321334 label ( 'When index of nested list is overwritten, then overwrite is also in slice' , basicCapabilities ) ,
322335 shell ,
@@ -352,7 +365,7 @@ person <- ${def('24', '"John"', '164', 'FALSE', 'grades')}
352365${ acc ( acc ( 'person' , 5 ) , 1 ) } <- 4.0
353366result <- ${ acc ( acc ( 'person' , 5 ) , 1 ) } ` ,
354367 ) ;
355-
368+
356369 assertSliced (
357370 label ( 'When nested list is overwritten, then only overwrite list is in slice' , basicCapabilities ) ,
358371 shell ,
@@ -371,7 +384,7 @@ ${acc('grades', 2)} <- 2.0
371384person <- ${ def ( '24' , '"John"' , '164' , 'FALSE' , 'grades' ) }
372385result <- ${ acc ( acc ( 'person' , 5 ) , 2 ) } ` ,
373386 ) ;
374-
387+
375388 assertSliced (
376389 label ( 'When nested list is overwritten after nesting, then only overwrite list is in slice' , basicCapabilities ) ,
377390 shell ,
@@ -389,7 +402,7 @@ person <- ${def('24', '"John"', '164', 'FALSE', 'grades')}
389402${ acc ( 'person' , 5 ) } <- ${ def ( '4.0' , '3.0' ) }
390403result <- ${ acc ( acc ( 'person' , 5 ) , 2 ) } ` ,
391404 ) ;
392-
405+
393406 assertSliced (
394407 label ( 'When nested list is accessed, then accesses to nested list are in slice' , basicCapabilities ) ,
395408 shell ,
@@ -407,7 +420,7 @@ ${acc('grades', 4)} <- 1.0
407420person <- ${ def ( '"John"' , 'grades' ) }
408421result <- ${ acc ( 'person' , 2 ) } ` ,
409422 ) ;
410-
423+
411424 assertSliced (
412425 label ( 'When nested list is accessed, then accesses to nested lists are in slice' , basicCapabilities ) ,
413426 shell ,
@@ -426,7 +439,7 @@ ${acc('grades', 2)} <- 1.0
426439person <- ${ def ( '"John"' , 'grades' ) }
427440result <- ${ acc ( 'person' , 2 ) } ` ,
428441 ) ;
429-
442+
430443 assertSliced (
431444 label ( 'When double nested list is accessed, then accesses to nested lists are in slice' , basicCapabilities ) ,
432445 shell ,
@@ -444,7 +457,7 @@ grades <- ${def('algebra_grades', '1.7')}
444457person <- ${ def ( '"John"' , 'grades' ) }
445458result <- ${ acc ( acc ( 'person' , 2 ) , 1 ) } ` ,
446459 ) ;
447-
460+
448461 assertSliced (
449462 label ( 'When list is assigned, then accesses to list and nested lists are in slice' , basicCapabilities ) ,
450463 shell ,
@@ -466,7 +479,7 @@ result <- person`,
466479 undefined ,
467480 'fail-both' ,
468481 ) ;
469-
482+
470483 assertSliced (
471484 label ( 'When nested list is redefined twice, then only second redefinition is in slice' , basicCapabilities ) ,
472485 shell ,
@@ -489,7 +502,7 @@ result <- ${acc(acc('person', 5), 2)}`,
489502 undefined ,
490503 'fail-both' ,
491504 ) ;
492-
505+
493506 assertSliced (
494507 label ( 'When nested list is redefined with static value, then only static value assignment is in slice' , basicCapabilities ) ,
495508 shell ,
@@ -510,7 +523,7 @@ result <- ${acc('person', 5)}`,
510523 undefined ,
511524 'fail-both' ,
512525 ) ;
513-
526+
514527 assertSliced (
515528 label ( 'When static list value is redefined with list, then only list value assignment is in slice' , basicCapabilities ) ,
516529 shell ,
@@ -563,7 +576,7 @@ if(u) ${acc('person', 2)} <- "peter"
563576wrapper <- ${ def ( 'person' ) }
564577print(${ acc ( acc ( 'wrapper' , 1 ) , 2 ) } )` ,
565578 ) ;
566-
579+
567580 //Currently we can not handle the indirect passing minimally and include the name line
568581 assertSliced (
569582 label ( 'Potential addition in nesting (not needed)' , basicCapabilities ) ,
0 commit comments