From 98b12f0a11b3ef0c7e77b0e0c1814c876637f38f Mon Sep 17 00:00:00 2001 From: Felix Schlegel Date: Thu, 2 Jan 2025 13:44:22 +0100 Subject: [PATCH] test(list-access): add supported capabilities ids to tests --- .../pointer-analysis/list-access.test.ts | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/test/functionality/slicing/pointer-analysis/list-access.test.ts b/test/functionality/slicing/pointer-analysis/list-access.test.ts index a0bb18b9ec..bf73386202 100644 --- a/test/functionality/slicing/pointer-analysis/list-access.test.ts +++ b/test/functionality/slicing/pointer-analysis/list-access.test.ts @@ -5,7 +5,7 @@ import { label } from '../../_helper/label'; describe.sequential('List access', withShell(shell => { describe('Simple access', () => { assertSliced( - label('List with single element', []), shell, + label('List with single element', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(name = "John") result <- person$name`, ['2@result'], @@ -14,7 +14,7 @@ result <- person$name`, ); assertSliced( - label('List with several elements', []), shell, + label('List with several elements', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(name = "John", age = 24, is_male = TRUE) result <- person$name`, ['2@result'], @@ -25,7 +25,7 @@ result <- person$name`, describe('Whole list access', () => { assertSliced( - label('When each argument of a list is redefined, then original list is still in slice', []), shell, + label('When each argument of a list is redefined, then original list is still in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John", is_male = TRUE) person$is_male <- FALSE person$name <- "Alice" @@ -40,7 +40,7 @@ result <- person` ); assertSliced( - label('When arguments are added to an empty list, then original list is in slice', []), shell, + label('When arguments are added to an empty list, then original list is in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list() person$is_male <- FALSE person$name <- "Alice" @@ -55,7 +55,7 @@ result <- person` ); assertSliced( - label('When whole list is redefined, then every list assignment before is not in slice', []), shell, + label('When whole list is redefined, then every list assignment before is not in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John") person$age <- 33 person$name <- "Jane" @@ -73,7 +73,7 @@ result <- person` describe('Access with other accesses', () => { assertSliced( - label('With other list', []), shell, + label('With other list', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John") other_person <- list(age = 24, name = "John") a <- other_person$name @@ -84,7 +84,7 @@ result <- person$name`, ); assertSliced( - label('With other accesses', []), shell, + label('With other accesses', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John", is_male = TRUE) a <- person$age b <- person$is_male @@ -97,7 +97,7 @@ result <- person$age`, describe('Access with assignment', () => { assertSliced( - label('When there is more than one assignment to the same index, then the last assignment is in the slice', []), + label('When there is more than one assignment to the same index, then the last assignment is in the slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John") person$name <- "Bob" @@ -111,7 +111,7 @@ result <- person$name`, ); assertSliced( - label('When there are assignments to the other indices, then they are not in the slice', []), + label('When there are assignments to the other indices, then they are not in the slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John", is_male = TRUE) person$is_male <- FALSE @@ -125,7 +125,7 @@ result <- person$name`, ); assertSliced( - label('When there are assignments to only other indices, then only list is in the slice', []), + label('When there are assignments to only other indices, then only list is in the slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `person <- list(age = 24, name = "John", is_male = TRUE) person$is_male <- FALSE @@ -139,7 +139,7 @@ result <- person$age`, describe('Nested lists', () => { assertSliced( - label('When index of nested list is overwritten, then overwrite is also in slice', []), + label('When index of nested list is overwritten, then overwrite is also in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0 @@ -156,7 +156,7 @@ result <- person$grades$algebra`, ); assertSliced( - label('When index of nested list is overwritten after nesting, then overwrite is also in slice', []), + label('When index of nested list is overwritten after nesting, then overwrite is also in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0 @@ -175,7 +175,7 @@ result <- person$grades$algebra`, ); assertSliced( - label('When nested list is overwritten, then only overwrite list is in slice', []), + label('When nested list is overwritten, then only overwrite list is in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0 @@ -194,7 +194,7 @@ result <- person$grades$music`, ); assertSliced( - label('When nested list is overwritten after nesting, then only overwrite list is in slice', []), + label('When nested list is overwritten after nesting, then only overwrite list is in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0 @@ -212,7 +212,7 @@ result <- person$grades$music`, ); assertSliced( - label('When nested list is accessed, then accesses to nested list are in slice', []), + label('When nested list is accessed, then accesses to nested list are in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, sports = 1.7) grades$algebra <- 1.0 @@ -230,7 +230,7 @@ result <- person$grades`, ); assertSliced( - label('When nested list is accessed, then accesses to nested lists are in slice', []), + label('When nested list is accessed, then accesses to nested lists are in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `algebra_grades <- list(test = 1.0, exam = 3.0) algebra_grades$test <- 4.0 @@ -249,7 +249,7 @@ result <- person$grades`, ); assertSliced( - label('When double nested list is accessed, then accesses to nested lists are in slice', []), + label('When double nested list is accessed, then accesses to nested lists are in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `algebra_grades <- list(test = 1.0, exam = 3.0) algebra_grades$test <- 4.0 @@ -268,7 +268,7 @@ result <- person$grades$algebra`, it.fails('When list is assigned, then accesses to list and nested lists are in slice', () => { assertSliced( - label('When list is assigned, then accesses to list and nested lists are in slice', []), + label('When list is assigned, then accesses to list and nested lists are in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `algebra_grades <- list(test = 1.0, exam = 3.0) algebra_grades$test <- 4.0 @@ -290,7 +290,7 @@ result <- person`, it.fails('When nested list is redefined twice, then only second redefinition is in slice', () => { assertSliced( - label('When nested list is redefined twice, then only second redefinition is in slice', []), + label('When nested list is redefined twice, then only second redefinition is in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0 @@ -313,7 +313,7 @@ result <- person$grades$music`, it.fails('When nested list is redefined with static value, then only static value assignment is in slice', () => { assertSliced( - label('When nested list is redefined with static value, then only static value assignment is in slice', []), + label('When nested list is redefined with static value, then only static value assignment is in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0 @@ -334,7 +334,7 @@ result <- person$grades`, it.fails('When static list value is redefined with list, then only list value assignment is in slice', () => { assertSliced( - label('When static list value is redefined with list, then only list value assignment is in slice', []), + label('When static list value is redefined with list, then only list value assignment is in slice', ['name-normal', 'function-calls', 'named-arguments', 'dollar-access', 'subsetting']), shell, `grades <- list(algebra = 1.3, german = 2.0, english = 2.3, sports = 1.7) grades$algebra <- 1.0