From 4575cd222aa78442d41373b710be0640b24871c5 Mon Sep 17 00:00:00 2001 From: Michael Williamson Date: Sat, 23 May 2026 11:31:02 +0100 Subject: Write custom area delimiters --- .../compiler/output/lang/java/JavaWriterTests.java | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/test/java/org/zwobble') diff --git a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java index 280dc21..5595b62 100644 --- a/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java +++ b/src/test/java/org/zwobble/hobgoblin/compiler/output/lang/java/JavaWriterTests.java @@ -26,6 +26,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" public class Rectangle { + // Custom area start: body + // Custom area end: body }""" )); } @@ -63,6 +65,9 @@ public class JavaWriterTests { public void b() { } + + // Custom area start: body + // Custom area end: body }""" )); } @@ -81,6 +86,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" /// A 2D point. public class Point { + // Custom area start: body + // Custom area end: body }""" )); } @@ -98,6 +105,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" public sealed interface Shape { + // Custom area start: body + // Custom area end: body }""" )); } @@ -118,6 +127,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" public sealed interface Shape permits abc.def.One, abc.def.Two { + // Custom area start: body + // Custom area end: body }""" )); } @@ -136,6 +147,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" /// A 2D shape. public sealed interface Shape { + // Custom area start: body + // Custom area end: body }""" )); } @@ -155,6 +168,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" public record Point() { + // Custom area start: body + // Custom area end: body }""" )); } @@ -175,6 +190,8 @@ public class JavaWriterTests { assertThat(string, equalTo(""" /// A 2D point. public record Point() { + // Custom area start: body + // Custom area end: body }""" )); } @@ -214,6 +231,9 @@ public class JavaWriterTests { public void b() { } + + // Custom area start: body + // Custom area end: body }""" )); } -- cgit v1.2.3