diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-11 04:49:20 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-11 04:49:20 +0100 |
| commit | fcffbf8fe95570ac551ccd4cc9475742213e9e5b (patch) | |
| tree | a836c2ddcda3d7120e558468d863e3bc49a9a4cf /test | |
| parent | a393a14154b435879e0fa2791fc629030073e810 (diff) | |
chore: codegen and specs improvements.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_samples/ostream_test.ncpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/test/test_samples/ostream_test.ncpp b/test/test_samples/ostream_test.ncpp index 5029c4a..130e2d3 100644 --- a/test/test_samples/ostream_test.ncpp +++ b/test/test_samples/ostream_test.ncpp @@ -1,14 +1,23 @@ struct iostream { - type <struct Tp_> - let consume(Tp_& val) + iostream() + { + return; + } + + ~iostream() + { + return; + } + + let write(let val) { return; } let read() { - let ch = getchar(); + let ch = 'a'; return ch; } }; @@ -18,10 +27,10 @@ let main() let six_seven = 100; let eight_nine = 1; - let io = iostream(); + let io = iostream{}; - io.consume(eight_nine); - io.consume(six_seven); + io.write(eight_nine); + six_seven = io.read(); return 0; } |
