summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@nekernel.org>2026-01-09 02:31:16 +0100
committerAmlal El Mahrouss <amlal@nekernel.org>2026-01-09 02:31:16 +0100
commit365e1851ab1b2f2e7eca2fb0697e5b7ff1023b60 (patch)
tree4f82da02b080a6de9ba0756bf1f21c319569831f /test
parent3550c29636d9a46f40d02908605144221bb7eb9b (diff)
chore: Nectar grunt work on runtime library and test code.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'test')
-rw-r--r--test/test_01_codegen/codegen.test.cc2
-rw-r--r--test/test_samples/ostream.ncpp13
-rw-r--r--test/test_samples/sample.ncpp4
3 files changed, 12 insertions, 7 deletions
diff --git a/test/test_01_codegen/codegen.test.cc b/test/test_01_codegen/codegen.test.cc
index 5115a9b..de88651 100644
--- a/test/test_01_codegen/codegen.test.cc
+++ b/test/test_01_codegen/codegen.test.cc
@@ -14,7 +14,7 @@ TEST(CodegenTest, BasicCodegenTestGrep) {
EXPECT_TRUE(compile_result == 0) << "C++ compiler driver failed to compile sample.cc";
// Grep for expected entry point symbol in generated assembly
- auto grep_main = std::system("grep -q '__NECTI_main' ../test_samples/sample.ncpp.masm");
+ auto grep_main = std::system("grep -q '__NECTAR_main' ../test_samples/sample.ncpp.masm");
EXPECT_TRUE(grep_main == 0) << "Generated assembly missing expected entry point __NECTAR_main";
// Grep for return instruction
diff --git a/test/test_samples/ostream.ncpp b/test/test_samples/ostream.ncpp
index 82e9fb4..acc8ae3 100644
--- a/test/test_samples/ostream.ncpp
+++ b/test/test_samples/ostream.ncpp
@@ -1,6 +1,8 @@
-#import <stdio.h>
+export ncpp.ostream;
-struct ostream
+#include <stdio.h>
+
+struct iostream
{
void consume(int& val)
{
@@ -13,5 +15,8 @@ struct ostream
}
};
-ostream out;
-ostream in;
+typedef iostream* ostream_ptr;
+
+ostream_ptr out;
+ostream_ptr in;
+
diff --git a/test/test_samples/sample.ncpp b/test/test_samples/sample.ncpp
index df857ac..c0b1fd1 100644
--- a/test/test_samples/sample.ncpp
+++ b/test/test_samples/sample.ncpp
@@ -1,9 +1,9 @@
-#import "ostream.ncpp"
+import ncpp.ostream;
int main(void)
{
let six_seven = 100;
- out.consume(six_seven);
+ out->consume(six_seven);
return 0;
}