diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-09 02:31:16 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-09 02:31:16 +0100 |
| commit | 365e1851ab1b2f2e7eca2fb0697e5b7ff1023b60 (patch) | |
| tree | 4f82da02b080a6de9ba0756bf1f21c319569831f /test | |
| parent | 3550c29636d9a46f40d02908605144221bb7eb9b (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.cc | 2 | ||||
| -rw-r--r-- | test/test_samples/ostream.ncpp | 13 | ||||
| -rw-r--r-- | test/test_samples/sample.ncpp | 4 |
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; } |
