diff options
author | Morgan Deters <mdeters@gmail.com> | 2010-04-09 16:25:32 +0000 |
---|---|---|
committer | Morgan Deters <mdeters@gmail.com> | 2010-04-09 16:25:32 +0000 |
commit | e390a4207d3858927354b3d4b40d540c00f8064c (patch) | |
tree | 589fd13ed8f6ba835cd79a2894092860b66b7696 /src/util | |
parent | c3a6ff8c6e4a0c743cd33eb29931f837eeb2959e (diff) |
added experimental "make lcov" target (it runs only unit tests); better coverage for util and context classes; implemented some output functionality that was missing; reclassified some tests white -> black or black -> public; other minor fixes
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/output.h | 35 |
1 files changed, 27 insertions, 8 deletions
diff --git a/src/util/output.h b/src/util/output.h index 6315389e8..79bdd788e 100644 --- a/src/util/output.h +++ b/src/util/output.h @@ -172,8 +172,8 @@ class CVC4_PUBLIC NoticeC { public: NoticeC(std::ostream* os) : d_os(os) {} - void operator()(const char*); - void operator()(std::string); + void operator()(const char* s) { *d_os << s; } + void operator()(std::string s) { *d_os << s; } void printf(const char* fmt, ...) __attribute__ ((format(printf, 2, 3))); @@ -193,8 +193,8 @@ class CVC4_PUBLIC ChatC { public: ChatC(std::ostream* os) : d_os(os) {} - void operator()(const char*); - void operator()(std::string); + void operator()(const char* s) { *d_os << s; } + void operator()(std::string s) { *d_os << s; } void printf(const char* fmt, ...) __attribute__ ((format(printf, 2, 3))); @@ -215,10 +215,29 @@ class CVC4_PUBLIC TraceC { public: TraceC(std::ostream* os) : d_os(os) {} - void operator()(const char* tag, const char*); - void operator()(const char* tag, std::string); - void operator()(std::string tag, const char*); - void operator()(std::string tag, std::string); + void operator()(const char* tag, const char* s) { + if(!d_tags.empty() && d_tags.find(std::string(tag)) != d_tags.end()) { + *d_os << s; + } + } + + void operator()(const char* tag, const std::string& s) { + if(!d_tags.empty() && d_tags.find(std::string(tag)) != d_tags.end()) { + *d_os << s; + } + } + + void operator()(const std::string& tag, const char* s) { + if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { + *d_os << s; + } + } + + void operator()(const std::string& tag, const std::string& s) { + if(!d_tags.empty() && d_tags.find(tag) != d_tags.end()) { + *d_os << s; + } + } void printf(const char* tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); void printf(std::string tag, const char* fmt, ...) __attribute__ ((format(printf, 3, 4))); |