EXPECT_THROW_MSG(attr->toIpv6Prefix(), TypeError,
"the attribute value type must be ipv6prefix, not integer");
EXPECT_THROW_MSG(attr->toIpv6PrefixLen(), TypeError,
- "the attribute value type must be ipv6prefix, not integer"
-);
+ "the attribute value type must be ipv6prefix, not integer");
EXPECT_THROW_MSG(attr->toVendorId(), TypeError,
"the attribute value type must be vsa, not integer");
EXPECT_THROW_MSG(attr->toVsaData(), TypeError,
too_big_binary), BadValue,
"value is too large 250 > 249");
- vector<uint8_t> too_bigvalue(MAX_STRING_LEN + 1, 0x87);
- EXPECT_THROW_MSG(Attribute::fromBytes(def, too_bigvalue), BadValue,
+ vector<uint8_t> too_big_value(MAX_STRING_LEN + 1, 0x87);
+ EXPECT_THROW_MSG(Attribute::fromBytes(def, too_big_value), BadValue,
"value is too large 254 > 253");
EXPECT_THROW_MSG(attr->toString(), TypeError,
static const char* TEST_FILE;
};
-const char* DictionaryTest::TEST_FILE = "test-dictionary";
+const char* DictionaryTest::TEST_FILE = "test-dictionary";
// Verifies standards definitions can be read from the dictionary.
TEST_F(DictionaryTest, standard) {
"0 is reserved at line 1");
EXPECT_THROW_MSG(parseLine("BEGIN-VENDOR"), BadValue,
"expected 2 tokens, got 1 at line 1");
- EXPECT_THROW_MSG(parseLine("BEGIN-VENDOR my-vendor 1"), BadValue,
+ EXPECT_THROW_MSG(parseLine("BEGIN-VENDOR my-vendor 1"), BadValue,
"expected 2 tokens, got 3 at line 1");
EXPECT_THROW_MSG(parseLine("END-VENDOR", 1), BadValue,
"expected 2 tokens, got 1 at line 1");
- EXPECT_THROW_MSG(parseLine("END-VENDOR my-vendor 1", 1), BadValue,
+ EXPECT_THROW_MSG(parseLine("END-VENDOR my-vendor 1", 1), BadValue,
"expected 2 tokens, got 3 at line 1");
EXPECT_THROW_MSG(parseLine("BEGIN-TLV my-vendor"), BadValue,
"VENDOR DSL-Forum 3561",
"BEGIN-VENDOR DSL-Forum",
"ATTRIBUTE Agent-Circuit-Id 1 string",
- "VALUE Agent-Circuit-Id My-Value 1",
+ "VALUE Agent-Circuit-Id My-Value 1",
"END-VENDOR DSL-Forum"
};
expected = "attribute 'Agent-Circuit-Id' in vendor 3561";
list<string> begin_unknown = {
"BEGIN-VENDOR foo"
};
- string expected = "unsupported embedded begin vendor, ";
+ string expected = "unsupported embedded begin vendor, ";
expected += "1 is still open at line 1";
EXPECT_THROW_MSG(parseLines(begin_unknown, 1), BadValue, expected);
// Value must be a known name or integer.
"ATTRIBUTE Actual-Data-Rate-Upstream 129 integer"
};
EXPECT_NO_THROW_LOG(parseLines(positive_n, 0, 3561));
- auto adru = AttrDefs::instance().getByType(129, 3561);
+ auto adru = AttrDefs::instance().getByType(129, 3561);
ASSERT_TRUE(adru);
EXPECT_EQ(129, adru->type_);
EXPECT_EQ(PW_TYPE_INTEGER, adru->value_type_);
// Verifies the $INCLUDE entry.
TEST_F(DictionaryTest, include) {
list<string> include;
- include.push_back("# Including the dictonary");
+ include.push_back("# Including the dictionary");
include.push_back(string("$INCLUDE ") + string(TEST_DICTIONARY));
include.push_back("# Dictionary included");
include.push_back("VENDOR ISC 2495");