Add unary op tests
This commit is contained in:
parent
7c59c6b643
commit
4cd94ff462
3 changed files with 16 additions and 0 deletions
|
|
@ -55,4 +55,5 @@ let unittest =
|
||||||
tests "function declarations" "test_func" @
|
tests "function declarations" "test_func" @
|
||||||
tests "enums" "test_enum" @
|
tests "enums" "test_enum" @
|
||||||
tests "macros" "test_macro" @
|
tests "macros" "test_macro" @
|
||||||
|
tests "operators" "test_operator" @
|
||||||
[]
|
[]
|
||||||
|
|
|
||||||
8
tests/generators/nim/test_operator_unary.c
Normal file
8
tests/generators/nim/test_operator_unary.c
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
int main() {
|
||||||
|
&a;
|
||||||
|
*b;
|
||||||
|
+c;
|
||||||
|
-d;
|
||||||
|
~e;
|
||||||
|
!f;
|
||||||
|
}
|
||||||
7
tests/generators/nim/test_operator_unary.nim
Normal file
7
tests/generators/nim/test_operator_unary.nim
Normal file
|
|
@ -0,0 +1,7 @@
|
||||||
|
proc main(): cint =
|
||||||
|
addr a
|
||||||
|
b[]
|
||||||
|
+c
|
||||||
|
-d
|
||||||
|
not e
|
||||||
|
not f
|
||||||
Loading…
Add table
Add a link
Reference in a new issue