Commit 4b8c1ab5 authored by Peter Kasting's avatar Peter Kasting Committed by Commit Bot

Remove using directives ("using namespace x") from testing/.

Bug: 82078
Change-Id: Id6acded56ab6c6e4133a274875db985e963fcf8a
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1820539
Commit-Queue: Peter Kasting <pkasting@chromium.org>
Commit-Queue: Jonathan Metzman <metzman@chromium.org>
Auto-Submit: Peter Kasting <pkasting@chromium.org>
Reviewed-by: default avatarJonathan Metzman <metzman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#699221}
parent 4e156587
......@@ -33,14 +33,12 @@ TestCase* test_case = new TestCase();
// Silence logging from the protobuf library.
protobuf_mutator::protobuf::LogSilencer log_silencer;
using namespace url_parse_proto_fuzzer;
std::string Slash_to_string(int slash) {
if (slash == Url::NONE)
if (slash == url_parse_proto_fuzzer::Url::NONE)
return "";
if (slash == Url::FORWARD)
if (slash == url_parse_proto_fuzzer::Url::FORWARD)
return "/";
if (slash == Url::BACKWARD) {
if (slash == url_parse_proto_fuzzer::Url::BACKWARD) {
return "\\";
}
assert(false && "Received unexpected value for slash");
......@@ -52,7 +50,7 @@ std::string Slash_to_string(int slash) {
// Since protobuf is a relatively simple format, fuzzing targets that do not
// accept protobufs (such as this one) will require code to convert from
// protobuf to the accepted format (string in this case).
std::string protobuf_to_string(const Url& url) {
std::string protobuf_to_string(const url_parse_proto_fuzzer::Url& url) {
// Build url_string piece by piece from url and then return it.
std::string url_string = std::string("");
......@@ -128,7 +126,7 @@ std::string protobuf_to_string(const Url& url) {
// typical libFuzzer based fuzzers. It is passed our Url protobuf object that
// was mutated by libFuzzer, converts it to a string and then feeds it to url()
// for fuzzing.
DEFINE_BINARY_PROTO_FUZZER(const Url& url_protobuf) {
DEFINE_BINARY_PROTO_FUZZER(const url_parse_proto_fuzzer::Url& url_protobuf) {
std::string url_string = protobuf_to_string(url_protobuf);
// Allow native input to be retrieved easily.
......
......@@ -4,7 +4,7 @@
#include "testing/libfuzzer/proto/json_proto_converter.h"
using namespace json_proto;
namespace json_proto {
void JsonProtoConverter::AppendArray(const ArrayValue& array_value) {
data_ << '[';
......@@ -65,3 +65,5 @@ std::string JsonProtoConverter::Convert(const JsonObject& json_object) {
AppendObject(json_object);
return data_.str();
}
} // namespace json_proto
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