def test_SanitizeKernelPrototype_multiple_spaces(): """Test that SanitizeKernelPrototype removes double whitespace.""" assert ( opencl.SanitizeKernelPrototype( """\ kernel void A(global float* a) {} """ ) == """\ kernel void A(global float* a) {} """ )
def test_SanitizeKernelPrototype_leading_whitespace(): """Test that SanitizeKernelPrototype strips leading whitespace.""" assert ( opencl.SanitizeKernelPrototype( """ kernel void A(global float* a) {} """ ) == """\ kernel void A(global float* a) {} """ )
def test_SanitizeKernelPrototype_empty_input(): """Test SanitizeKernelPrototype on an empty input.""" assert opencl.SanitizeKernelPrototype('') == ''