summaryrefslogtreecommitdiff
path: root/tests/run/extra_patma.pyx
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run/extra_patma.pyx')
-rw-r--r--tests/run/extra_patma.pyx18
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/run/extra_patma.pyx b/tests/run/extra_patma.pyx
new file mode 100644
index 000000000..b2303f45b
--- /dev/null
+++ b/tests/run/extra_patma.pyx
@@ -0,0 +1,18 @@
+# mode: run
+
+cdef bint is_null(int* x):
+ return False # disabled - currently just a parser test
+ match x:
+ case NULL:
+ return True
+ case _:
+ return False
+
+def test_is_null():
+ """
+ >>> test_is_null()
+ """
+ cdef int some_int = 1
+ return # disabled - currently just a parser test
+ assert is_null(&some_int) == False
+ assert is_null(NULL) == True