diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-12 12:10:32 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@nekernel.org> | 2026-01-12 12:11:20 +0100 |
| commit | ff7ee3e3e070a2abee70fd93062065060118cf9e (patch) | |
| tree | 2718e81141bc32ac272b77f67e7e381f4ae68dbf /test | |
| parent | cce0f5c05980c0f51348536192e5527a0828940c (diff) | |
chore: wip: Introduce `libNectarStd`'s Generics Library.
Signed-off-by: Amlal El Mahrouss <amlal@nekernel.org>
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_samples/iostream.ncpp | 9 | ||||
| -rw-r--r-- | test/test_samples/ostream_test.ncpp | 39 | ||||
| -rw-r--r-- | test/test_samples/return_value.ncpp | 6 |
3 files changed, 15 insertions, 39 deletions
diff --git a/test/test_samples/iostream.ncpp b/test/test_samples/iostream.ncpp new file mode 100644 index 0000000..de1e6b8 --- /dev/null +++ b/test/test_samples/iostream.ncpp @@ -0,0 +1,9 @@ +import iostream; + +let main() +{ + let io = iostream{}; + let first_number = io.read_once(); + + return first_number; +}
\ No newline at end of file diff --git a/test/test_samples/ostream_test.ncpp b/test/test_samples/ostream_test.ncpp deleted file mode 100644 index 2c4d5b2..0000000 --- a/test/test_samples/ostream_test.ncpp +++ /dev/null @@ -1,39 +0,0 @@ -struct iostream -{ - iostream() - { - return; - } - - ~iostream() - { - return; - } - - let write(let val) - { - return; - } - - let read() - { - let ch = 'a'; - return ch; - } -}; - -let dread() -{ - return 0; -} - -let main() -{ - let six_seven = 67; - - let io = iostream{}; - io.read(); - six_seven = dread(); - - return six_seven; -} diff --git a/test/test_samples/return_value.ncpp b/test/test_samples/return_value.ncpp new file mode 100644 index 0000000..897ca15 --- /dev/null +++ b/test/test_samples/return_value.ncpp @@ -0,0 +1,6 @@ +let main() +{ + let six_seven = 67; + + return six_seven; +} |
