您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ std_log函数代码示例

51自学网 2021-06-03 08:23:28
  C++
这篇教程C++ std_log函数代码示例写得很实用,希望能帮到您。

本文整理汇总了C++中std_log函数的典型用法代码示例。如果您正苦于以下问题:C++ std_log函数的具体用法?C++ std_log怎么用?C++ std_log使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。

在下文中一共展示了std_log函数的21个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: main

int main (int argc, char *argv[]){  int i;  int ret;  int failed = 0;  OilParameter param;    //xmlfile = "proto3";  std_log(LOG_FILENAME_LINE, "Test Started testsuite_proto3");  for(i=0;good_params[i];i++){    ret = oil_param_from_string (&param, good_params[i]);    if (!ret) {      printf("***ERROR***/n");      std_log(LOG_FILENAME_LINE, "***ERROR***");      failed = 1;    }    print_param (&param);  }  for(i=0;bad_params[i];i++){    ret = oil_param_from_string (&param, bad_params[i]);    if (ret) {      printf("***ERROR***/n");      std_log(LOG_FILENAME_LINE, "***ERROR***");      failed = 1;    }  }  std_log(LOG_FILENAME_LINE, "Test Successful");  create_xml(0);  return failed;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:32,


示例2: main

int main(){       DBusMessage* msg;		msg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL);		if(!msg)	{		std_log(LOG_FILENAME_LINE,"Fail to create Message");		create_xml(1);		return 1;	}		if(DBUS_MESSAGE_TYPE_METHOD_CALL != dbus_message_get_type(msg))	{		std_log(LOG_FILENAME_LINE,"Mismatch in Message type.");		create_xml(1);		return 1;	}		std_log(LOG_FILENAME_LINE,"Test Successful");	create_xml(0);	return 0;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:25,


示例3: test_gdouble_to_guint64

void test_gdouble_to_guint64(){     gdouble from[] = { 0., 1., 100., 10000., 9223372036854775808.,    9223372036854775809., 13835058055282163712.  };  guint64 to[] = { 0, 1, 100, 10000, (guint64) (1) << 63,    ((guint64) (1) << 63) + 1,    ((guint64) (1) << 63) + (G_GINT64_CONSTANT (1) << 62)  };  guint64 tolerance[] = { 0, 0, 0, 0, 0, 1, 1 };  gint i;  gdouble result;  guint64 delta;    xmlfile = "gstutils_test_gdouble_to_guint64";    std_log(LOG_FILENAME_LINE, "Test Started gstutils_test_gdouble_to_guint64");  for (i = 0; i < G_N_ELEMENTS (from); ++i) {    result = gst_util_gdouble_to_guint64 (from[i]);    delta = ABS (to[i] - result);    fail_unless (delta <= tolerance[i],        "Could not convert %f: %" G_GUINT64_FORMAT        " -> %d, got %d instead, delta of %e with tolerance of %e",        i, from[i], to[i], result, delta, tolerance[i]);  }  std_log(LOG_FILENAME_LINE, "Test Successful");  create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:29,


示例4: test_yuv2rgbx_sub2_u8

void test_yuv2rgbx_sub2_u8()    {    uint8_t src1[MAX_SIZE], src2[MAX_SIZE], src3[MAX_SIZE];    uint8_t res[RES_SIZE],check[RES_SIZE]={0,134,0,0,0,135,0,0,0,135,0,0,0,136,0,0,0,136,0,0,0,137,0,0,0,137,0,0,0,138,0,0,0,138,0,0,0,139,0,0};    int i;        for(i=0;i<MAX_SIZE;i++)    {          src1[i]=i;          src2[i]=i+1;          src3[i]=i+1;    }        for(i=0;i<RES_SIZE;i++)        res[i]=0;            oil_yuv2rgbx_sub2_u8(res,src1,src2,src3,MAX_SIZE);        for(i=0;i<RES_SIZE;i++)    if(res[i] == check[i])        {         std_log(LOG_FILENAME_LINE,"oil_yuv2rgbx_sub2_u8 successful, res[%d] = %d", i,res[i]);         }    else        {         assert_failed=1;         std_log(LOG_FILENAME_LINE,"oil_yuv2rgbx_sub2_u8 unsuccessful, Expected =%d,Obtained =%d",check[i],res[i]);        }    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:29,


示例5: main

int main(){	DBusError src;	DBusError dest;	char err[] = "Sample Error0";					dbus_error_init(&src);	dbus_error_init(&dest);		dbus_set_error(&src, err, NULL);		dbus_move_error(&src, &dest);		if(!CheckMovedError(&src, &dest, err))	{		std_log(LOG_FILENAME_LINE, "Test Fail");		dbus_error_free(&src);		dbus_error_free(&dest);		create_xml(1);		return 1;	}	else	{		std_log(LOG_FILENAME_LINE, "Test Successful");		dbus_error_free(&dest);		create_xml(0);		return 0;	}}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:29,


示例6: test_flags

void test_flags(){  GstElement *element;  GError *err = NULL;  xmlfile = "test_flags";    std_log(LOG_FILENAME_LINE, "Test Started test_flags");      /* avoid misleading 'no such element' error debug messages when using cvs */  if (!g_getenv ("GST_DEBUG"))    gst_debug_set_default_threshold (GST_LEVEL_NONE);  /* default behaviour is to return any already constructed bins/elements */  element = gst_parse_launch_full ("fakesrc ! coffeesink", NULL, 0, &err);  fail_unless (err != NULL, "expected error");  fail_unless_equals_int (err->code, GST_PARSE_ERROR_NO_SUCH_ELEMENT);  fail_unless (element != NULL, "expected partial pipeline/element");  g_error_free (err);  err = NULL;  gst_object_unref (element);  /* test GST_PARSE_FLAG_FATAL_ERRORS */  element = gst_parse_launch_full ("fakesrc ! coffeesink", NULL,      GST_PARSE_FLAG_FATAL_ERRORS, &err);  fail_unless (err != NULL, "expected error");  fail_unless_equals_int (err->code, GST_PARSE_ERROR_NO_SUCH_ELEMENT);  fail_unless (element == NULL, "expected NULL return with FATAL_ERRORS");  g_error_free (err);  err = NULL;    std_log(LOG_FILENAME_LINE, "Test Successful");   create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:33,


示例7: _rw_check_init

static inline void_rw_check_init (bool init, int line, const char *func){    if (init && !driver_initialized) {        fprintf (stderr, "%s:%d: %s: test driver already initialized/n",                 __FILE__, line, func);     std_log(LOG_FILENAME_LINE,"%s:%d: %s: test driver already initialized/n",                 __FILE__, line, func);                         abort ();    }    if (!init && driver_initialized) {        fprintf (stderr, "%s:%d: %s: test driver not initialized yet/n",                 __FILE__, line, func);      std_log(LOG_FILENAME_LINE,"%s:%d: %s: test driver not initialized yet/n",                 __FILE__, line, func);                          abort ();    }    if (driver_finished) {        fprintf (stderr, "%s:%d: %s: test finished, cannot call/n",                 __FILE__, line, func);     std_log(LOG_FILENAME_LINE,"%s:%d: %s: test finished, cannot call/n",                 __FILE__, line, func);                     }}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:26,


示例8: test_fill

static voidtest_fill (const std::size_t N){    rw_info (0, 0, 0,            "template <class %s, class %s> "            "void std::fill (%1$s, %1$s, const %2$s&)",            "ForwardIterator", "T");    if (rw_opt_no_fwd_iter) {        rw_note (0, __FILE__, __LINE__, "ForwardIterator test disabled");        std_log(LOG_FILENAME_LINE,"ForwardIterator test disabled");      }    else {        test_fill (N, FwdIter<X>(), (X*)0);    }    if (rw_opt_no_bidir_iter) {        rw_note (0, __FILE__, __LINE__, "BidirectionalIterator test disabled");        std_log(LOG_FILENAME_LINE,"BidirectionalIterator test disabled");      }    else {        test_fill (N, BidirIter<X>(), (X*)0);    }    if (rw_opt_no_rnd_iter) {        rw_note (0, __FILE__, __LINE__,  "RandomAccessIterator test disabled");        std_log(LOG_FILENAME_LINE,"RandomAccessIterator test disabled");      }    else {        test_fill (N, RandomAccessIter<X>(), (X*)0);    }}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:32,


示例9: main

intmain (int   argc,      char *argv[]){  GstElement *pipeline;  GstElement *source, *filter, *sink;  xmlfile = "test_elementlink";  std_log(LOG_FILENAME_LINE, "Test Started element link");  /* init */  gst_init (&argc, &argv);  /* create pipeline */  pipeline = gst_pipeline_new ("my-pipeline");  /* create elements */  source = gst_element_factory_make ("fakesrc", "source");  filter = gst_element_factory_make ("identity", "filter");  sink = gst_element_factory_make ("fakesink", "sink");  /* must add elements to pipeline before linking them */  gst_bin_add_many (GST_BIN (pipeline), source, filter, sink, NULL);  /* link */  if (!gst_element_link_many (source, filter, sink, NULL)) {    g_warning ("Failed to link elements!");  }  std_log(LOG_FILENAME_LINE, "Test Successful");  create_xml(0);/*** block b  from ../../../docs/manual/basics-elements.xml ***/  return 0;/*** block c  from ../../../docs/manual/basics-elements.xml ***/}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:34,


示例10: main

int main(){    DBusError error;    char* err = "Sample Error0";    dbus_error_init(&error);    dbus_set_error(&error, err, NULL);    if(strcmp(err, error.name))    {        std_log(LOG_FILENAME_LINE, "Mismatch in Error Name");        create_xml(1);        return 1;    }    if(strcmp(err, error.message))    {        std_log(LOG_FILENAME_LINE, "Message set to :: %s", error.message);        std_log(LOG_FILENAME_LINE, "Message is not set to NULL");        create_xml(1);        return 1;    }    dbus_error_free(&error);    std_log(LOG_FILENAME_LINE, "Test Successful");    create_xml(0);    return 0;}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:28,


示例11: main

int main(){    DBusMessage* msg;    char* path = "/";    msg = dbus_message_new(DBUS_MESSAGE_TYPE_METHOD_CALL);    if(!msg)    {        std_log(LOG_FILENAME_LINE,"Fail to create Message");        create_xml(1);        return 1;    }    if(!dbus_message_set_path(msg, path))    {        std_log(LOG_FILENAME_LINE,"Not enough Memory.");        create_xml(1);        return 1;    }    if(strcmp(path, dbus_message_get_path(msg)))    {        std_log(LOG_FILENAME_LINE,"Path is not correct");        create_xml(1);        return 1;    }    std_log(LOG_FILENAME_LINE,"Test Successful");    create_xml(0);    return 0;}
开发者ID:kuailexs,项目名称:symbiandump-os2,代码行数:33,


示例12: test_pipelines

void test_pipelines(){  gint quality;  xmlfile = "test_pipelines";std_log(LOG_FILENAME_LINE, "Test Started test_pipelines");  /* Test qualities 0, 5 and 10 */  for (quality = 0; quality < 11; quality += 5) {    test_pipeline (8, FALSE, 44100, 48000, quality);    test_pipeline (8, FALSE, 48000, 44100, quality);    test_pipeline (16, FALSE, 44100, 48000, quality);    test_pipeline (16, FALSE, 48000, 44100, quality);    test_pipeline (24, FALSE, 44100, 48000, quality);    test_pipeline (24, FALSE, 48000, 44100, quality);    test_pipeline (32, FALSE, 44100, 48000, quality);    test_pipeline (32, FALSE, 48000, 44100, quality);    test_pipeline (32, TRUE, 44100, 48000, quality);    test_pipeline (32, TRUE, 48000, 44100, quality);    test_pipeline (64, TRUE, 44100, 48000, quality);    test_pipeline (64, TRUE, 48000, 44100, quality);   }    std_log(LOG_FILENAME_LINE, "Test Successful");  create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:29,


示例13: main

int main(){	std_log(LOG_FILENAME_LINE,"[Test Case for intrusive_ptr_test]");    n_element_type::test();    n_constructors::test();    n_destructor::test();    n_assignment::test();    n_access::test();    n_swap::test();    n_comparison::test();    n_static_cast::test();    n_dynamic_cast::test();    n_transitive::test();    n_report_1::test();#ifdef __SYMBIAN32__    int failures = boost::report_errors();	if(failures)	{		std_log(LOG_FILENAME_LINE,"Result : Failed");		assert_failed = true;	}	else	{		std_log(LOG_FILENAME_LINE,"Result : Passed");	}	std_log(LOG_FILENAME_LINE,"[End Test Case ]");#endif	testResultXml("intrusive_ptr_test");	close_log_file();	return failures;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:33,


示例14: test

void test()    {    OilTest *test;    OilParameter *p;    int16_t *data;    int n;    int footer;    int footer_increment = 10;    OilFunctionClass *klass;    OilFunctionImpl *impl;        klass = oil_class_get("abs_f32_f32");        if(klass != NULL)        {        test = (OilTest *)oil_test_new(klass);                 if(test != NULL)            {            impl = (OilFunctionImpl*)calloc(sizeof(OilFunctionImpl), 0);            impl->func = (void*)abs_f32_f32_test;            impl->name = "abs_f32_f32_test";            impl->klass = klass;                        oil_test_set_impl(test, impl);                        if(test->impl != impl)                {                std_log(LOG_FILENAME_LINE,"oil_test_set_impl failed. errno = %d", errno);                assert_failed = 1;                }                        p = &test->params[1];            footer = p->test_footer;            oil_test_set_test_footer(test, p, OIL_TEST_FOOTER+footer_increment);                        if(p->test_footer != footer+footer_increment)                {                std_log(LOG_FILENAME_LINE,"oil_test_set_test_footer failed. errno = %d", errno);                assert_failed = 1;                }                        data = (int16_t *)oil_test_get_source_data (test, OIL_ARG_SRC1);            n = oil_test_get_arg_pre_n (test, OIL_ARG_SRC1);                        oil_test_cleanup(test);            oil_test_free(test);            }        else            {            std_log(LOG_FILENAME_LINE,"oil_test_new returned NULL. errno = %d", errno);            assert_failed = 1;            }        }    else        {        std_log(LOG_FILENAME_LINE,"oil_class_get returned NULL. errno = %d", errno);        assert_failed = 1;        }    }
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:60,


示例15: test_parse_launch_errors

void test_parse_launch_errors(){  GstElement *pipe;  GError *err;  const gchar *arr[] = { "fakesrc", "fakesink", NULL };  std_log(LOG_FILENAME_LINE, "Test started test_parse_launch_errors");    err = NULL;  pipe = gst_parse_launch ("fakesrc ! fakesink", &err);  fail_unless (err != NULL, "expected an error, but did not get one");  fail_unless (pipe == NULL, "got pipeline, but expected NULL");  fail_unless (err->domain == GST_CORE_ERROR);  fail_unless (err->code == GST_CORE_ERROR_DISABLED);  g_error_free (err);  err = NULL;  pipe = gst_parse_bin_from_description ("fakesrc ! fakesink", TRUE, &err);  fail_unless (err != NULL, "expected an error, but did not get one");  fail_unless (pipe == NULL, "got pipeline, but expected NULL");  fail_unless (err->domain == GST_CORE_ERROR);  fail_unless (err->code == GST_CORE_ERROR_DISABLED);  g_error_free (err);  err = NULL;  pipe = gst_parse_launchv (arr, &err);  fail_unless (err != NULL, "expected an error, but did not get one");  fail_unless (pipe == NULL, "got pipeline, but expected NULL");  fail_unless (err->domain == GST_CORE_ERROR);  fail_unless (err->code == GST_CORE_ERROR_DISABLED);  g_error_free (err);    std_log(LOG_FILENAME_LINE, "Test Successful");  create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:35,


示例16: test_no_clients

void test_no_clients(){  GstElement *sink;  GstBuffer *buffer;  GstCaps *caps;    std_log(LOG_FILENAME_LINE, "Test Started test_no_clients");  sink = setup_multifdsink ();  ASSERT_SET_STATE (sink, GST_STATE_PLAYING, GST_STATE_CHANGE_ASYNC);  caps = gst_caps_from_string ("application/x-gst-check");  buffer = gst_buffer_new_and_alloc (4);  gst_buffer_set_caps (buffer, caps);  gst_caps_unref (caps);  fail_unless (gst_pad_push (mysrcpad, buffer) == GST_FLOW_OK);  GST_DEBUG ("cleaning up multifdsink");  ASSERT_SET_STATE (sink, GST_STATE_NULL, GST_STATE_CHANGE_SUCCESS);  //commented bz..select() blocks indefinitly  cleanup_multifdsink (sink);    std_log(LOG_FILENAME_LINE, "Test Successful");      create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:26,


示例17: test_without_implements_interface

void test_without_implements_interface(){  GstElement *element;    std_log(LOG_FILENAME_LINE, "Test Started test_without_implements_interface");  /* we shouldn't crash if someone tries to use   * gst_element_implements_interface() on an element which doesn't implement   * the GstImplementsInterface (neither if the element does implement the   * requested interface, nor if it doesn't) */  element = gst_element_factory_make ("filesrc", "filesrc");  fail_unless (element != NULL, "Could not create filesrc element");  /* does not implement GstImplementsInterface, but does implement the   * GstUriHandler interface, so should just return TRUE */  fail_if (!gst_element_implements_interface (element, GST_TYPE_URI_HANDLER));  fail_if (gst_element_implements_interface (element,          GST_TYPE_IMPLEMENTS_INTERFACE));  gst_object_unref (element);  element = gst_element_factory_make ("identity", "identity");  fail_unless (element != NULL, "Could not create identity element");  fail_if (gst_element_implements_interface (element, GST_TYPE_URI_HANDLER));  fail_if (gst_element_implements_interface (element,          GST_TYPE_IMPLEMENTS_INTERFACE));  gst_object_unref (element);    std_log(LOG_FILENAME_LINE, "Test Successful");    create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:30,


示例18: main

int main (int argc, char *argv[]){  std_log(LOG_FILENAME_LINE,"[Test Case for string assign]");   #ifndef __SYMBIAN32__     return rw_test (argc, argv, __FILE__,                    "lib.string.assign",                    0 /* no comment */, run_test,                    0 /* co command line options */);   #else    rw_test (argc, argv, __FILE__,                    "lib.string.assign",                    0 /* no comment */, run_test,                    0 /* co command line options */);                     if(failures)      {            assert_failed = true;       std_log(LOG_FILENAME_LINE,"Result: Failed");      }     else      {       std_log(LOG_FILENAME_LINE,"Result: Passed");      }     std_log(LOG_FILENAME_LINE,"[End Test Case]");         testResultXml("21_string_assign");    close_log_file();  #endif    return failures;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:32,


示例19: main

int main(){   	DBusError error;	DBusConnection* connection;	dbus_int32_t data_slot = -1;		dbus_error_init(&error);		connection = dbus_bus_get_private(DBUS_BUS_SESSION, &error);	if(!CheckConnection(connection, &error))	{		create_xml(1);		return 1;	}		if(!dbus_connection_allocate_data_slot(&data_slot))	{		std_log(LOG_FILENAME_LINE, "Out of Memory");		create_xml(1);		return 1;	}		dbus_connection_free_data_slot(&data_slot);	dbus_connection_close(connection);	dbus_connection_unref(connection);	dbus_shutdown();		std_log(LOG_FILENAME_LINE, "Test Successful");	create_xml(0);	return 0;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:32,


示例20: main

int main(){	DBusGConnection* connection;	DBusGProxy* proxy;	GError* error = NULL;		char* path = "/Test/Proxy/Path";		g_type_init();		connection = dbus_g_bus_get(DBUS_BUS_SESSION, &error);	if (connection == NULL)		{			std_log(LOG_FILENAME_LINE, "Failed to open connection to bus: %s/n",		              error->message);		  g_error_free (error);		  create_xml(1);		  return 1;		}		proxy = dbus_g_proxy_new_for_name(connection, "Test.Glib.Proxy.Path", path, "Test.Proxy.Interface");		if(strcmp(path, dbus_g_proxy_get_path(proxy)))		{		std_log(LOG_FILENAME_LINE, "Fail to check interface %s", path);		create_xml(1);		return 1;		}		std_log(LOG_FILENAME_LINE, "Test Successful");	create_xml(0);	return 0;}
开发者ID:cdaffara,项目名称:symbiandump-os2,代码行数:33,


示例21: test_load_coreelements

void test_load_coreelements(){    GstPlugin *unloaded_plugin;    GstPlugin *loaded_plugin;    //xmlfile = "test_load_coreelements";    std_log(LOG_FILENAME_LINE, "Test Started test_load_coreelements");    unloaded_plugin = gst_default_registry_find_plugin ("coreelements");    fail_if (unloaded_plugin == NULL, "Failed to find coreelements plugin");    fail_if (GST_OBJECT_REFCOUNT_VALUE (unloaded_plugin) != 2,             "Refcount of unloaded plugin in registry initially should be 2");    GST_DEBUG ("refcount %d", GST_OBJECT_REFCOUNT_VALUE (unloaded_plugin));    loaded_plugin = gst_plugin_load (unloaded_plugin);    fail_if (loaded_plugin == NULL, "Failed to load plugin");    if (loaded_plugin != unloaded_plugin) {        fail_if (GST_OBJECT_REFCOUNT_VALUE (loaded_plugin) != 2,                 "Refcount of loaded plugin in registry should be 2");        GST_DEBUG ("refcount %d", GST_OBJECT_REFCOUNT_VALUE (loaded_plugin));        fail_if (GST_OBJECT_REFCOUNT_VALUE (unloaded_plugin) != 1,                 "Refcount of replaced plugin should be 1");        GST_DEBUG ("refcount %d", GST_OBJECT_REFCOUNT_VALUE (unloaded_plugin));    }    gst_object_unref (unloaded_plugin);    gst_object_unref (loaded_plugin);    std_log(LOG_FILENAME_LINE, "Test Successful");    create_xml(0);}
开发者ID:kuailexs,项目名称:symbiandump-mw1,代码行数:27,



注:本文中的std_log函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


C++ std_session_send_df_header函数代码示例
C++ std_err函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。