Skip to content

Commit

Permalink
Enable preview in pos/i18533 tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hamzaremmal committed Feb 16, 2024
1 parent 31531ef commit 11d0290
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 5 deletions.
4 changes: 2 additions & 2 deletions compiler/test/dotty/tools/utils.scala
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,6 @@ class ToolArgsTest:
@Test def `tool is present`: Unit = assertEquals("-hey" :: Nil, toolArgsFor(ToolName.Test, None)("// test: -hey" :: Nil))
@Test def `missing tool is absent`: Unit = assertEquals(Nil, toolArgsFor(ToolName.Javac, None)("// test: -hey" :: Nil))
@Test def `multitool is present`: Unit =
assertEquals("-hey" :: Nil, toolArgsFor(ToolName.Test, None)("// test: -hey" :: "// javac: -d /tmp" :: Nil))
assertEquals("-d" :: "/tmp" :: Nil, toolArgsFor(ToolName.Javac, None)("// test: -hey" :: "// javac: -d /tmp" :: Nil))
assertEquals("-hey" :: Nil, toolArgsFor(ToolName.Test, None)("// test: -hey" :: "// java: -d /tmp" :: Nil))
assertEquals("-d" :: "/tmp" :: Nil, toolArgsFor(ToolName.Java, None)("// test: -hey" :: "// java: -d /tmp" :: Nil))
end ToolArgsTest
3 changes: 3 additions & 0 deletions tests/pos/i18533/Cat.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//> using javacOpt --enable-preview --source 17
//> test: -jvm 17+

package i18533;

public final class Cat extends Pet {
Expand Down
3 changes: 3 additions & 0 deletions tests/pos/i18533/Dog.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//> using javacOpt --enable-preview --source 17
//> test: -jvm 17+

package i18533;

public non-sealed class Dog extends Pet {
Expand Down
3 changes: 3 additions & 0 deletions tests/pos/i18533/Pet.java
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
//> using javacOpt --enable-preview --source 17
//> test: -jvm 17+

package i18533;

public sealed class Pet permits Cat, Dog {
Expand Down
3 changes: 0 additions & 3 deletions tests/run/t9915/C_1.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
/*
* javac: -encoding UTF-8
*/
public class C_1 {
public static final String NULLED = "X\000ABC";
public static final String SUPPED = "π’ˆπ’π’‘π’›π’π’˜π’•π’–";
Expand Down

0 comments on commit 11d0290

Please sign in to comment.