summaryrefslogtreecommitdiff
path: root/jlox/app/src
diff options
context:
space:
mode:
authorphysick <mynameisgennadiy@vk.com>2026-07-22 14:23:37 +0500
committerphysick <mynameisgennadiy@vk.com>2026-07-22 14:23:37 +0500
commitae2ed5d7a3d0b6981e9560ff76141f51a0656294 (patch)
tree2681e29b1472f548ccc89eb2cce8c8ae9e95eab3 /jlox/app/src
Java impl init
Diffstat (limited to 'jlox/app/src')
-rw-r--r--jlox/app/src/main/java/org/example/App.java14
-rw-r--r--jlox/app/src/test/java/org/example/AppTest.java14
2 files changed, 28 insertions, 0 deletions
diff --git a/jlox/app/src/main/java/org/example/App.java b/jlox/app/src/main/java/org/example/App.java
new file mode 100644
index 0000000..e7e1af9
--- /dev/null
+++ b/jlox/app/src/main/java/org/example/App.java
@@ -0,0 +1,14 @@
+/*
+ * This source file was generated by the Gradle 'init' task
+ */
+package org.example;
+
+public class App {
+ public String getGreeting() {
+ return "Hello World!";
+ }
+
+ public static void main(String[] args) {
+ System.out.println(new App().getGreeting());
+ }
+}
diff --git a/jlox/app/src/test/java/org/example/AppTest.java b/jlox/app/src/test/java/org/example/AppTest.java
new file mode 100644
index 0000000..f5ce33d
--- /dev/null
+++ b/jlox/app/src/test/java/org/example/AppTest.java
@@ -0,0 +1,14 @@
+/*
+ * This source file was generated by the Gradle 'init' task
+ */
+package org.example;
+
+import org.junit.jupiter.api.Test;
+import static org.junit.jupiter.api.Assertions.*;
+
+class AppTest {
+ @Test void appHasAGreeting() {
+ App classUnderTest = new App();
+ assertNotNull(classUnderTest.getGreeting(), "app should have a greeting");
+ }
+}