Skip to content

Commit 8569bca

Browse files
committed
Re-add the clear variables but package access only
1 parent 43275d0 commit 8569bca

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

src/test/java/io/github/syst3ms/skriptparser/parsing/SyntaxParserTest.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import io.github.syst3ms.skriptparser.log.LogEntry;
55
import io.github.syst3ms.skriptparser.log.LogType;
66
import io.github.syst3ms.skriptparser.registration.SkriptAddon;
7+
import io.github.syst3ms.skriptparser.variables.DatabaseTest;
78

89
import org.junit.jupiter.api.DynamicContainer;
910
import org.junit.jupiter.api.DynamicNode;
@@ -71,6 +72,8 @@ public Iterator<DynamicNode> syntaxTest() {
7172
var allErrors = new ArrayList<>(errorsFound);
7273
Set<String> duplicateErrors = new HashSet<>();
7374
allErrors.removeIf(val -> !duplicateErrors.add(val.getMessage()));
75+
76+
DatabaseTest.clearAllVariables();
7477
errorsFound.clear();
7578

7679
MultipleFailureException.assertEmpty(allErrors);

src/test/java/io/github/syst3ms/skriptparser/variables/VariablesTest.java renamed to src/test/java/io/github/syst3ms/skriptparser/variables/DatabaseTest.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
import java.util.List;
1414
import java.util.Optional;
1515

16-
public class VariablesTest {
16+
public class DatabaseTest {
1717

1818
private static final List<String> LINES = Arrays.asList(
1919
"databases:",
@@ -31,6 +31,10 @@ public void clearVariables() {
3131
Variables.clearVariables();
3232
}
3333

34+
public static void clearAllVariables() {
35+
Variables.clearVariables();
36+
}
37+
3438
@Before
3539
public void setupVariables() {
3640
Variables.registerStorage(RamStorage.class, "ram");

0 commit comments

Comments
 (0)