summaryrefslogtreecommitdiff
path: root/src/tests/eina_cxx/eina_cxx_test_log.cc
diff options
context:
space:
mode:
authorFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2014-04-09 19:12:46 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-04-09 19:12:46 +0900
commit6bb01b0d18607ba6b7334a8f0fff6d16946364f1 (patch)
tree77556e9a23131dfe2e26bd2d7b81f0d2e1108b0b /src/tests/eina_cxx/eina_cxx_test_log.cc
parent6436618c92c9e1c250dba78a498d9e33e42d82d5 (diff)
eina-cxx: Modified eina C++ log use syntax
Summary: Modified syntax for eina C++ log to imitate the macro call as returning a stream. So, instead of: EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain, "foo " << 5); It is now used as: EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain) << "foo " << 5; Which more closely resambles using IOStreams in C++. @feature Reviewers: cedric, barbieri, smohanty Reviewed By: barbieri CC: cedric Differential Revision: https://phab.enlightenment.org/D623
Diffstat (limited to 'src/tests/eina_cxx/eina_cxx_test_log.cc')
-rw-r--r--src/tests/eina_cxx/eina_cxx_test_log.cc44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/tests/eina_cxx/eina_cxx_test_log.cc b/src/tests/eina_cxx/eina_cxx_test_log.cc
index 52c8ccdc61..4d32d41f2c 100644
--- a/src/tests/eina_cxx/eina_cxx_test_log.cc
+++ b/src/tests/eina_cxx/eina_cxx_test_log.cc
@@ -40,7 +40,7 @@ START_TEST(eina_cxx_expensive_log)
40 40
41 domain.set_level(EINA_LOG_LEVEL_CRITICAL); 41 domain.set_level(EINA_LOG_LEVEL_CRITICAL);
42 42
43 EINA_CXX_DOM_LOG_ERR(domain, "foo " << ::expensive_call()); 43 EINA_CXX_DOM_LOG_ERR(domain) << "foo " << ::expensive_call();
44 ck_assert(!expensive_called); 44 ck_assert(!expensive_called);
45} 45}
46END_TEST 46END_TEST
@@ -51,17 +51,17 @@ START_TEST(eina_cxx_domain_log)
51 51
52 efl::eina::log_domain domain("error_domain"); 52 efl::eina::log_domain domain("error_domain");
53 53
54 EINA_CXX_DOM_LOG_CRIT(domain, "foo 0x" << std::hex << 10); 54 EINA_CXX_DOM_LOG_CRIT(domain) << "foo 0x" << std::hex << 10;
55 EINA_CXX_DOM_LOG_ERR(domain, "foo " << 5); 55 EINA_CXX_DOM_LOG_ERR(domain) << "foo " << 5;
56 EINA_CXX_DOM_LOG_INFO(domain, "foo " << 5); 56 EINA_CXX_DOM_LOG_INFO(domain) << "foo " << 5;
57 EINA_CXX_DOM_LOG_DBG(domain, "foo " << 5); 57 EINA_CXX_DOM_LOG_DBG(domain) << "foo " << 5;
58 EINA_CXX_DOM_LOG_WARN(domain, "foo " << 5); 58 EINA_CXX_DOM_LOG_WARN(domain) << "foo " << 5;
59 59
60 EINA_CXX_LOG_CRIT("foo " << 5); 60 EINA_CXX_LOG_CRIT() << "foo " << 5;
61 EINA_CXX_LOG_ERR("foo " << 5); 61 EINA_CXX_LOG_ERR() << "foo " << 5;
62 EINA_CXX_LOG_INFO("foo " << 5); 62 EINA_CXX_LOG_INFO() << "foo " << 5;
63 EINA_CXX_LOG_DBG("foo " << 5); 63 EINA_CXX_LOG_DBG() << "foo " << 5;
64 EINA_CXX_LOG_WARN("foo " << 5); 64 EINA_CXX_LOG_WARN() << "foo " << 5;
65} 65}
66END_TEST 66END_TEST
67 67
@@ -69,11 +69,11 @@ START_TEST(eina_cxx_default_domain_log)
69{ 69{
70 efl::eina::eina_init init; 70 efl::eina::eina_init init;
71 71
72 EINA_CXX_DOM_LOG_CRIT(efl::eina::default_domain, "foo " << 5); 72 EINA_CXX_DOM_LOG_CRIT(efl::eina::default_domain) << "foo " << 5;
73 EINA_CXX_DOM_LOG_ERR(efl::eina::default_domain, "foo " << 5); 73 EINA_CXX_DOM_LOG_ERR(efl::eina::default_domain) << "foo " << 5;
74 EINA_CXX_DOM_LOG_INFO(efl::eina::default_domain, "foo " << 5); 74 EINA_CXX_DOM_LOG_INFO(efl::eina::default_domain) << "foo " << 5;
75 EINA_CXX_DOM_LOG_DBG(efl::eina::default_domain, "foo " << 5); 75 EINA_CXX_DOM_LOG_DBG(efl::eina::default_domain) << "foo " << 5;
76 EINA_CXX_DOM_LOG_WARN(efl::eina::default_domain, "foo " << 5); 76 EINA_CXX_DOM_LOG_WARN(efl::eina::default_domain) << "foo " << 5;
77} 77}
78END_TEST 78END_TEST
79 79
@@ -83,11 +83,11 @@ START_TEST(eina_cxx_global_domain_log)
83 83
84 efl::eina::log_domain domain("domain"); 84 efl::eina::log_domain domain("domain");
85 85
86 EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain, "foo " << 5); 86 EINA_CXX_DOM_LOG_CRIT(efl::eina::global_domain) << "foo " << 5;
87 EINA_CXX_DOM_LOG_ERR(efl::eina::global_domain, "foo " << 5); 87 EINA_CXX_DOM_LOG_ERR(efl::eina::global_domain) << "foo " << 5;
88 EINA_CXX_DOM_LOG_INFO(efl::eina::global_domain, "foo " << 5); 88 EINA_CXX_DOM_LOG_INFO(efl::eina::global_domain) << "foo " << 5;
89 EINA_CXX_DOM_LOG_DBG(efl::eina::global_domain, "foo " << 5); 89 EINA_CXX_DOM_LOG_DBG(efl::eina::global_domain) << "foo " << 5;
90 EINA_CXX_DOM_LOG_WARN(efl::eina::global_domain, "foo " << 5); 90 EINA_CXX_DOM_LOG_WARN(efl::eina::global_domain) << "foo " << 5;
91} 91}
92END_TEST 92END_TEST
93 93