#include "net/dns/nsswitch_reader.h"
#include <string>
#include <utility>
#include <vector>
#include "base/check.h"
#include "base/functional/bind.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
class TestFileReader { … };
class NsswitchReaderTest : public testing::Test { … };
TEST_F(NsswitchReaderTest, ActualReadAndParseHosts) { … }
TEST_F(NsswitchReaderTest, FileReadErrorResultsInDefault) { … }
TEST_F(NsswitchReaderTest, MissingHostsResultsInDefault) { … }
TEST_F(NsswitchReaderTest, ParsesAllKnownServices) { … }
TEST_F(NsswitchReaderTest, ParsesRepeatedServices) { … }
TEST_F(NsswitchReaderTest, ParsesAllKnownActions) { … }
TEST_F(NsswitchReaderTest, ParsesAllKnownStatuses) { … }
TEST_F(NsswitchReaderTest, ParsesRepeatedActions) { … }
TEST_F(NsswitchReaderTest, ParsesCombinedActionLists) { … }
TEST_F(NsswitchReaderTest, HandlesAtypicalWhitespace) { … }
TEST_F(NsswitchReaderTest, HandlesAtypicalWhitespaceInActions) { … }
TEST_F(NsswitchReaderTest, ParsesActionsWithoutService) { … }
TEST_F(NsswitchReaderTest, ParsesNegatedActions) { … }
TEST_F(NsswitchReaderTest, ParsesUnrecognizedServiceAsUnknown) { … }
TEST_F(NsswitchReaderTest, ParsesUnrecognizedStatusAsUnknown) { … }
TEST_F(NsswitchReaderTest, ParsesUnrecognizedActionAsUnknown) { … }
TEST_F(NsswitchReaderTest, ParsesInvalidActionsAsUnknown) { … }
TEST_F(NsswitchReaderTest, IgnoresInvalidlyClosedActions) { … }
TEST_F(NsswitchReaderTest, ParsesServicesAfterInvalidlyClosedActionsAsUnknown) { … }
TEST_F(NsswitchReaderTest, IgnoresComments) { … }
TEST_F(NsswitchReaderTest, IgnoresEndOfLineComments) { … }
TEST_F(NsswitchReaderTest, IgnoresCapitalization) { … }
TEST_F(NsswitchReaderTest, IgnoresEmptyActions) { … }
TEST_F(NsswitchReaderTest, IgnoresRepeatedActionBrackets) { … }
TEST_F(NsswitchReaderTest, IgnoresRepeatedActionBracketsWithWhitespace) { … }
TEST_F(NsswitchReaderTest, RejectsNonSensicalActionBrackets) { … }
TEST_F(NsswitchReaderTest, RejectsServicesWithBrackets) { … }
TEST_F(NsswitchReaderTest, RejectsNestedActionBrackets) { … }
TEST_F(NsswitchReaderTest, IgnoresEmptyActionWithRepeatedBrackets) { … }
TEST_F(NsswitchReaderTest, IgnoresEmptyActionAtEndOfString) { … }
}
}