<commit_before>//
//  Copyright <NAME> 2010
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//

#include "test.h"
#include "openclam/cl.hpp"

BOOST_AUTO_TEST_CASE( kernel_keyword_substitution_test )
{
    const std::string expected =
        "kernel void MyKernel() "
        "{ "
        "}";
    const std::string actual = KERNEL( MyKernel,
        kernel void MyKernel()
        {
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

BOOST_AUTO_TEST_CASE( __kernel_keyword_substitution_test )
{
    const std::string expected =
        "__kernel void MyKernel() "
        "{ "
        "}";
    const std::string actual = KERNEL( MyKernel,
        __kernel void MyKernel()
        {
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

BOOST_AUTO_TEST_CASE( global_keyword_substitution_test )
{
    const std::string expected =
        "__kernel void MyKernel( global const float* a ) "
        "{ "
        "a; "
        "}";
    const std::string actual = KERNEL( MyKernel,
        __kernel void MyKernel( global const float* a )
        {
            a;
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

BOOST_AUTO_TEST_CASE( __global_keyword_substitution_test )
{
    const std::string expected =
        "__kernel void MyKernel( __global const float* a ) "
        "{ "
        "a; "
        "}";
    const std::string actual = KERNEL( MyKernel,
        __kernel void MyKernel( __global const float* a )
        {
            a;
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}
<commit_msg>add a commented test related to issue 1<commit_after>//
//  Copyright <NAME> 2010
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//

#include "test.h"
#include "openclam/cl.hpp"

//BOOST_AUTO_TEST_CASE( kernel_keyword_is_a_valid_identifier ) // $$$$ 27-02-2010 SILVIN: uncomment this test related to issue 1 (http://code.google.com/p/openclam/issues/detail?id=1)
//{
//    const std::string kernel   = "";
//    const std::string __kernel = "";
//    const std::string global   = "";
//    const std::string __global = "";
//}

BOOST_AUTO_TEST_CASE( kernel_keyword_substitution_test )
{
    const std::string expected =
        "kernel void MyKernel() "
        "{ "
        "}";
    const std::string actual = KERNEL( MyKernel,
        kernel void MyKernel()
        {
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

BOOST_AUTO_TEST_CASE( __kernel_keyword_substitution_test )
{
    const std::string expected =
        "__kernel void MyKernel() "
        "{ "
        "}";
    const std::string actual = KERNEL( MyKernel,
        __kernel void MyKernel()
        {
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

BOOST_AUTO_TEST_CASE( global_keyword_substitution_test )
{
    const std::string expected =
        "__kernel void MyKernel( global const float* a ) "
        "{ "
        "a; "
        "}";
    const std::string actual = KERNEL( MyKernel,
        __kernel void MyKernel( global const float* a )
        {
            a;
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

BOOST_AUTO_TEST_CASE( __global_keyword_substitution_test )
{
    const std::string expected =
        "__kernel void MyKernel( __global const float* a ) "
        "{ "
        "a; "
        "}";
    const std::string actual = KERNEL( MyKernel,
        __kernel void MyKernel( __global const float* a )
        {
            a;
        } );
    BOOST_CHECK_EQUAL( actual, expected );
}

{'fraction_non_alphanumeric': 0.11430076376086384, 'fraction_numerical': 0.008164340268633132, 'mean_word_length': 2.0878048780487806, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3211035', 'n_tokens_mistral': 1234, 'n_tokens_neox': 1193, 'n_words': 271}