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

[2371] define END_OF_STREAM within InputSource to avoid duplicate def.

unfortunately this requires another usual workaround in the test, so
it was also made.
parent 5654a073
......@@ -38,7 +38,7 @@ namespace master_lexer_internal {
class InputSource {
public:
/// \brief Returned by getChar() when end of stream is reached.
static const int END_OF_STREAM;
static const int END_OF_STREAM = -1;
/// \brief Exception thrown when ungetChar() is made to go before
/// the start of buffer.
......@@ -139,8 +139,6 @@ private:
std::istream& input_;
};
const int InputSource::END_OF_STREAM = -1;
} // namespace master_lexer_internal
} // namespace dns
} // namespace isc
......
......@@ -27,6 +27,10 @@ using namespace std;
using namespace isc::dns;
using namespace isc::dns::master_lexer_internal;
// Some compilers cannot find symbols of class constants when used in the
// EXPECT_xxx macros, so we need explicit declaration.
const int InputSource::END_OF_STREAM;
namespace {
class InputSourceTest : public ::testing::Test {
......
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