IMPORTSSSSSSSSSSS
This commit is contained in:
parent
77ca7b179c
commit
d7f87a37e8
9 changed files with 467 additions and 28 deletions
6
tests/import_tests/duplicate_main.sui
Normal file
6
tests/import_tests/duplicate_main.sui
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
use "./module_a"
|
||||
use "./module_b"
|
||||
|
||||
fn main() -> int do
|
||||
0
|
||||
end
|
||||
20
tests/import_tests/good_import.c
Normal file
20
tests/import_tests/good_import.c
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
struct Point {
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
int helper_func(void);
|
||||
int main(void);
|
||||
|
||||
|
||||
int helper_func(void) {
|
||||
return 42;
|
||||
}
|
||||
|
||||
int main(void) {
|
||||
return helper_func();
|
||||
}
|
||||
|
||||
5
tests/import_tests/good_import.sui
Normal file
5
tests/import_tests/good_import.sui
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
use "./util"
|
||||
|
||||
fn main() -> int do
|
||||
helper_func()
|
||||
end
|
||||
3
tests/import_tests/module_a.sui
Normal file
3
tests/import_tests/module_a.sui
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn test_func() -> int do
|
||||
42
|
||||
end
|
||||
3
tests/import_tests/module_b.sui
Normal file
3
tests/import_tests/module_b.sui
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
fn test_func() -> int do
|
||||
99
|
||||
end
|
||||
8
tests/import_tests/util.sui
Normal file
8
tests/import_tests/util.sui
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
fn helper_func() -> int do
|
||||
42
|
||||
end
|
||||
|
||||
struct Point
|
||||
x: int,
|
||||
y: int,
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue