Skip to content

Commit

Permalink
test: add test for Unnamed Class Compilation Unit printing
Browse files Browse the repository at this point in the history
  • Loading branch information
clementdessoude committed Oct 29, 2023
1 parent 2b42563 commit 9e2cd48
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import com.toto.titi.Test;
import com.toto.titi.Toast;

class TestClass { static String greetings() { return "Hello world!"; } }
interface TestInterface { default String greetings() { return "Hello world!"; } }

;
String greeting() { return "Hello, World!"; }

void main() {
System.out.println(Test.greeting());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import com.toto.titi.Test;
import com.toto.titi.Toast;

class TestClass {

static String greetings() {
return "Hello world!";
}
}

interface TestInterface {
default String greetings() {
return "Hello world!";
}
}

String greeting() {
return "Hello, World!";
}

void main() {
System.out.println(Test.greeting());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { testSample } from "../../test-utils";

describe("prettier-java: Unnamed Class Compilation Unit", () => {
testSample(__dirname);
});

0 comments on commit 9e2cd48

Please sign in to comment.