Exemplo n.º 1
0
    def xtest_xxx(self):
        result = get_cpp_function_list_with_extnesion("""
void CmDiagnosticsService::startService()
{
    TRACE_LOG_BEG(log_);
    auto func = limFacade_->fetchByClass(lim::MoFunc_l::className);

    if (!func)
    {
        INFO_LOG(log_) << "Failed to retrieve Func_L object.";
        limFacade_->subscribeForFunclCreation(
            core::types::bindWeak(shared_from_this(), &CmDiagnosticsService::funcCreateHandler),
            subscriptionFuncl_);
        return;
    }
    createAndInitializeCmDiagnostics(func);
    TRACE_LOG_END(log_);
}""", ir())
        self.assertEqual({"a::b"}, result[0].dependencies)
Exemplo n.º 2
0
    def xtest_xxx(self):
        result = get_cpp_function_list_with_extension(
            """
void CmDiagnosticsService::startService()
{
    TRACE_LOG_BEG(log_);
    auto func = limFacade_->fetchByClass(lim::MoFunc_l::className);

    if (!func)
    {
        INFO_LOG(log_) << "Failed to retrieve Func_L object.";
        limFacade_->subscribeForFunclCreation(
            core::types::bindWeak(shared_from_this(), &CmDiagnosticsService::funcCreateHandler),
            subscriptionFuncl_);
        return;
    }
    createAndInitializeCmDiagnostics(func);
    TRACE_LOG_END(log_);
}""", ir())
        self.assertEqual({"a::b"}, result[0].dependencies)
Exemplo n.º 3
0
 def test_empty_source(self):
     result = get_cpp_function_list_with_extension("", ir())
     self.assertEqual(0, len(result))
Exemplo n.º 4
0
 def test_parameter(self):
     result = get_cpp_function_list_with_extension("void f(type a){a;}",
                                                   ir())
     self.assertEqual(set(), result[0].dependencies)
Exemplo n.º 5
0
 def test_scoped_name(self):
     result = get_cpp_function_list_with_extension("int C::f(){a::b();}",
                                                   ir())
     self.assertEqual({"a::b"}, result[0].dependencies)
Exemplo n.º 6
0
 def test_using_local_variable(self):
     result = get_cpp_function_list_with_extension("int C::f(){type a; a;}",
                                                   ir())
     self.assertEqual(set(), result[0].dependencies)
Exemplo n.º 7
0
 def test_a_function_with_keyword(self):
     result = get_cpp_function_list_with_extension("int C::f(){if(m)b();}",
                                                   ir())
     self.assertEqual({"m", "b"}, result[0].dependencies)
Exemplo n.º 8
0
 def test_a_function_with_one_dependency(self):
     result = get_cpp_function_list_with_extension("int C::f(){a();}", ir())
     self.assertEqual({"a"}, result[0].dependencies)
Exemplo n.º 9
0
 def test_a_c_function(self):
     result = get_cpp_function_list_with_extension("void f(){}", ir())
     self.assertEqual(1, len(result))
     self.assertEqual(set(), result[0].dependencies)
Exemplo n.º 10
0
 def test_empty_source(self):
     result = get_cpp_function_list_with_extnesion("", ir())
     self.assertEqual(0, len(result))
Exemplo n.º 11
0
 def test_parameter(self):
     result = get_cpp_function_list_with_extnesion("void f(type a){a;}", ir())
     self.assertEqual(set(), result[0].dependencies)
Exemplo n.º 12
0
 def test_scoped_name(self):
     result = get_cpp_function_list_with_extnesion("int C::f(){a::b();}", ir())
     self.assertEqual({"a::b"}, result[0].dependencies)
Exemplo n.º 13
0
 def test_using_local_variable(self):
     result = get_cpp_function_list_with_extnesion("int C::f(){type a; a;}", ir())
     self.assertEqual(set(), result[0].dependencies)
Exemplo n.º 14
0
 def test_a_function_with_keyword(self):
     result = get_cpp_function_list_with_extnesion("int C::f(){if(m)b();}", ir())
     self.assertEqual({"m", "b"}, result[0].dependencies)
Exemplo n.º 15
0
 def test_a_function_with_one_dependency(self):
     result = get_cpp_function_list_with_extnesion("int C::f(){a();}", ir())
     self.assertEqual({"a"}, result[0].dependencies)
Exemplo n.º 16
0
 def test_a_c_function(self):
     result = get_cpp_function_list_with_extnesion("void f(){}", ir())
     self.assertEqual(1, len(result))
     self.assertEqual(set(), result[0].dependencies)