Commit b3a9a422 authored by JINMEI Tatuya's avatar JINMEI Tatuya
Browse files

[trac1057] it turned out logcheck.h had the same problem. applied the

same sense of fixes (introducing a separate named namespace; avoid
'using namespace' in the header file).
parent 1cbcbc84
......@@ -12,8 +12,14 @@
// OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
// PERFORMANCE OF THIS SOFTWARE.
#include <boost/shared_ptr.hpp>
#include "logcheck.h"
using namespace isc::acl;
using namespace isc::acl::tests;
using boost::shared_ptr;
namespace {
// Test version of the Acl class. It adds few methods to examine the protected
......@@ -39,7 +45,7 @@ public:
TestACL acl_;
Log log_;
size_t next_check_;
shared_ptr<Check<Log> > getCheck(bool accepts) {
boost::shared_ptr<Check<Log> > getCheck(bool accepts) {
return (shared_ptr<Check<Log> >(new ConstCheck(accepts,
next_check_++)));
}
......
......@@ -19,6 +19,7 @@
using namespace std;
using namespace boost;
using namespace isc::acl;
using namespace isc::acl::tests;
using isc::data::Element;
using isc::data::ConstElementPtr;
......
......@@ -19,14 +19,11 @@
#include <acl/acl.h>
#include <cassert>
// This is not a public header, it is used only inside the tests. Therefore
// we lower the standards a bit and use anonymous namespace in the header
// and "using", just for convenience. This is just to share little bit of code
// between multiple tests.
using namespace isc::acl;
using boost::shared_ptr;
// This is not a public header, it is used only inside the tests.
namespace {
namespace isc {
namespace acl {
namespace tests {
// This is arbitrary guess of size for the log. If it's too small for your
// test, just make it bigger.
......@@ -86,6 +83,12 @@ private:
bool accepts_;
};
}
}
}
#endif
// Local Variables:
// mode: c++
// End:
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment