@@ -27,13 +27,15 @@ def test_line_contains_openacc_directive():
27
27
assert not line_contains_openacc_directive (f90_code , Cxx ())
28
28
assert line_contains_openacc_directive (f90_code , Fortran ())
29
29
assert not line_contains_openacc_directive (cxx_code , Fortran ())
30
+ assert not line_contains_openacc_directive (cxx_code , None )
30
31
31
32
32
33
def test_line_contains_openacc_parallel_directive ():
33
34
assert line_contains_openacc_parallel_directive ("#pragma acc parallel wait" , Cxx ())
34
35
assert line_contains_openacc_parallel_directive ("!$acc parallel" , Fortran ())
35
36
assert not line_contains_openacc_parallel_directive ("#pragma acc loop" , Cxx ())
36
37
assert not line_contains_openacc_parallel_directive ("!$acc loop" , Fortran ())
38
+ assert not line_contains_openacc_parallel_directive ("!$acc parallel" , None )
37
39
38
40
39
41
def test_openacc_pragma_contains_data_clause ():
@@ -50,11 +52,13 @@ def test_create_data_directive():
50
52
create_data_directive_openacc ("matrix" , 35 , Fortran ())
51
53
== "!$acc enter data create(matrix(:35))\n !$acc update device(matrix(:35))\n "
52
54
)
55
+ assert create_data_directive_openacc ("array" , 1024 , None ) == ""
53
56
54
57
55
58
def test_exit_data_directive ():
56
59
assert exit_data_directive_openacc ("array" , 1024 , Cxx ()) == "#pragma acc exit data copyout(array[:1024])\n "
57
60
assert exit_data_directive_openacc ("matrix" , 35 , Fortran ()) == "!$acc exit data copyout(matrix(:35))\n "
61
+ assert exit_data_directive_openacc ("matrix" , 1024 , None ) == ""
58
62
59
63
60
64
def test_correct_kernel ():
0 commit comments