aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCan2024-12-11 21:46:50 +0100
committerGitHub2024-12-11 21:46:50 +0100
commit0740a71446abe5227ee44b56301806de3c31046d (patch)
tree0d46a4a8d27731f0b6fb6c5921ea01156bbe17b2 /src
Initial commit
Diffstat (limited to 'src')
-rw-r--r--src/lib.effekt3
-rw-r--r--src/main.effekt5
-rw-r--r--src/test.effekt10
3 files changed, 18 insertions, 0 deletions
diff --git a/src/lib.effekt b/src/lib.effekt
new file mode 100644
index 0000000..d997f03
--- /dev/null
+++ b/src/lib.effekt
@@ -0,0 +1,3 @@
+module src/lib
+
+def helloWorld(): String = "Hello, world!" \ No newline at end of file
diff --git a/src/main.effekt b/src/main.effekt
new file mode 100644
index 0000000..35e7955
--- /dev/null
+++ b/src/main.effekt
@@ -0,0 +1,5 @@
+module main // must be named same as the file!
+
+import src/lib
+
+def main(): Unit = println(helloWorld()) \ No newline at end of file
diff --git a/src/test.effekt b/src/test.effekt
new file mode 100644
index 0000000..d0244bc
--- /dev/null
+++ b/src/test.effekt
@@ -0,0 +1,10 @@
+module src/test
+
+import test
+import src/lib
+
+def main() = mainSuite("lib") {
+ test("Hello world") {
+ assertEqual(helloWorld(), "Hello, world!")
+ }
+}