def test_missing_template_specialization():
    config = Config()
    specializer = FunctionSpecializer(config)

    template = TemplateFunction("test.hpp", "", "myFun", "T")
    template.template_types.append("T")

    assert_warns_message(UserWarning, "No template specialization registered", specializer.specialize, template)
示例#2
0
def test_missing_template_specialization():
    config = Config()
    specializer = FunctionSpecializer(config)

    template = TemplateFunction("test.hpp", "", "myFun", "T")
    template.template_types.append("T")

    assert_warns_message(UserWarning, "No template specialization registered",
                         specializer.specialize, template)
示例#3
0
def test_add_argument_without_method():
    parser = Parser("test.hpp")
    parser.init_ast()
    assert_warns_message(UserWarning, "Ignored function parameter",
                         parser.add_param, "a", "void")
def test_add_argument_without_method():
    parser = Parser("test.hpp")
    parser.init_ast()
    assert_warns_message(UserWarning, "Ignored function parameter",
                         parser.add_param, "a", "void")