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/test_samples | |
| 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/test_samples')
| -rw-r--r-- | test/test_samples/ostream.ncpp | 13 | ||||
| -rw-r--r-- | test/test_samples/sample.ncpp | 4 |
2 files changed, 11 insertions, 6 deletions
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; } |
