Add some tests and refactor test suite
This commit is contained in:
parent
801658b9ea
commit
a810611cee
14 changed files with 86 additions and 17 deletions
1
tests/generators/nim/test_enum_initial_val.c
Normal file
1
tests/generators/nim/test_enum_initial_val.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
enum color { RED = 1, GREEN, BLUE};
|
||||
1
tests/generators/nim/test_enum_initial_val.nim
Normal file
1
tests/generators/nim/test_enum_initial_val.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
type color = enum RED = 1, GREEN, BLUE
|
||||
1
tests/generators/nim/test_func_2args.c
Normal file
1
tests/generators/nim/test_func_2args.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
int sub(int x, int y);
|
||||
1
tests/generators/nim/test_func_2args.nim
Normal file
1
tests/generators/nim/test_func_2args.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
proc sub(x: cint, y: cint): cint
|
||||
2
tests/generators/nim/test_macro_multi.c
Normal file
2
tests/generators/nim/test_macro_multi.c
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
#define SIMPLE 42
|
||||
#define FUNC foo(SIMPLE)
|
||||
2
tests/generators/nim/test_macro_multi.nim
Normal file
2
tests/generators/nim/test_macro_multi.nim
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
const SIMPLE = 42
|
||||
const FUNC = foo(SIMPLE)
|
||||
1
tests/generators/nim/test_macro_simple.c
Normal file
1
tests/generators/nim/test_macro_simple.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
#define SIMPLE 42
|
||||
1
tests/generators/nim/test_macro_simple.nim
Normal file
1
tests/generators/nim/test_macro_simple.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
const SIMPLE = 42
|
||||
1
tests/generators/nim/test_macro_simple_func.c
Normal file
1
tests/generators/nim/test_macro_simple_func.c
Normal file
|
|
@ -0,0 +1 @@
|
|||
#define FUNC foo(42)
|
||||
1
tests/generators/nim/test_macro_simple_func.nim
Normal file
1
tests/generators/nim/test_macro_simple_func.nim
Normal file
|
|
@ -0,0 +1 @@
|
|||
const FUNC = foo(42)
|
||||
Loading…
Add table
Add a link
Reference in a new issue