summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-08 16:56:35 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-08 16:56:35 +0100
commitf8f2153b6b859dee35192f237d292e75c0a4cd76 (patch)
treedc6653957315777d50200cddabcdd7a8661a3ab0 /test
parentdd72dcbd5d07a9b4a2f735765233e2cc5faa7849 (diff)
chore: Starting writing Nectar implementation, specs in progress.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'test')
-rw-r--r--test/test_samples/ostream.ncpp9
-rw-r--r--test/test_samples/sample.asm7
-rw-r--r--test/test_samples/sample.cc24
-rw-r--r--test/test_samples/sample.ncpp11
4 files changed, 20 insertions, 31 deletions
diff --git a/test/test_samples/ostream.ncpp b/test/test_samples/ostream.ncpp
new file mode 100644
index 0000000..8f0248f
--- /dev/null
+++ b/test/test_samples/ostream.ncpp
@@ -0,0 +1,9 @@
+#import <stdio.h>
+
+struct ostream
+{
+ void write(int& val)
+ {
+ printf("%i", val);
+ }
+};
diff --git a/test/test_samples/sample.asm b/test/test_samples/sample.asm
deleted file mode 100644
index 72b1a46..0000000
--- a/test/test_samples/sample.asm
+++ /dev/null
@@ -1,7 +0,0 @@
-%bits 64
-%org 0x40000000
-
-public_segment .code64 __ImageStart
- mov rax, 5
- ret
-
diff --git a/test/test_samples/sample.cc b/test/test_samples/sample.cc
deleted file mode 100644
index 038f487..0000000
--- a/test/test_samples/sample.cc
+++ /dev/null
@@ -1,24 +0,0 @@
-class ostream
-{
- ostream()
- {
- return void;
- }
-
- ~ostream()
- {
- return void;
- }
-
- ostream& write(const char* buf, const long sz)
- {
- return *this;
- }
-};
-
-int main()
-{
- ostream* f = new ostream();
- f->write("foo", 3);
- return 0;
-}
diff --git a/test/test_samples/sample.ncpp b/test/test_samples/sample.ncpp
new file mode 100644
index 0000000..241f69e
--- /dev/null
+++ b/test/test_samples/sample.ncpp
@@ -0,0 +1,11 @@
+#import "ostream.ncpp"
+
+int main(void)
+{
+ ostream s;
+ let six_seven = 67;
+
+ s.write(six_seven);
+
+ return 0;
+}