BIND 10 trac1626, updated. a29f99f27df0d39ad097b393dff0ef12f6e89388 [1626] Add more testcases
BIND 10 source code commits
bind10-changes at lists.isc.org
Mon Apr 2 11:53:23 UTC 2012
The branch, trac1626 has been updated
via a29f99f27df0d39ad097b393dff0ef12f6e89388 (commit)
from 318ecd4e65de22d957ed55f571e868ceb3152f97 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit a29f99f27df0d39ad097b393dff0ef12f6e89388
Author: Mukund Sivaraman <muks at isc.org>
Date: Mon Apr 2 17:23:09 2012 +0530
[1626] Add more testcases
-----------------------------------------------------------------------
Summary of changes:
src/lib/cc/tests/data_unittests.cc | 14 ++++++++------
1 files changed, 8 insertions(+), 6 deletions(-)
-----------------------------------------------------------------------
diff --git a/src/lib/cc/tests/data_unittests.cc b/src/lib/cc/tests/data_unittests.cc
index c732026..84ee33e 100644
--- a/src/lib/cc/tests/data_unittests.cc
+++ b/src/lib/cc/tests/data_unittests.cc
@@ -333,16 +333,18 @@ TEST(Element, escape) {
EXPECT_THROW(Element::fromJSON("\\\"\\\""), JSONError);
// Inside strings is OK
EXPECT_NO_THROW(Element::fromJSON("\"\\\"\\\"\""));
- // String not terminated
+ // String not delimited correctly
EXPECT_THROW(Element::fromJSON("\"hello"), JSONError);
- // Bad string
+ EXPECT_THROW(Element::fromJSON("hello\""), JSONError);
+ // Bad strings
EXPECT_THROW(Element::fromJSON("hello\"foobar\""), JSONError);
+ EXPECT_THROW(Element::fromJSON("\"foobar\"hello"), JSONError);
// A whitespace test
- EXPECT_NO_THROW(Element::fromJSON("\" \n \r \t \n \n \t\""));
+ EXPECT_NO_THROW(Element::fromJSON("\" \n \r \t \f \n \n \t\""));
// Whitespace outside of json element
- EXPECT_NO_THROW(Element::fromJSON(" \n \t \r \b \"\" \n \t \r \b"));
- EXPECT_NO_THROW(Element::fromJSON("{ \n \r \t \b }"));
- EXPECT_NO_THROW(Element::fromJSON("[ \n \r \t \b ]"));
+ EXPECT_NO_THROW(Element::fromJSON(" \n \t \r \f \b \"\" \n \f \t \r \b"));
+ EXPECT_NO_THROW(Element::fromJSON("{ \n \r \t \b \f }"));
+ EXPECT_NO_THROW(Element::fromJSON("[ \n \r \f \t \b ]"));
}
TEST(Element, ListElement) {
More information about the bind10-changes
mailing list