You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by bm...@apache.org on 2016/07/06 06:26:40 UTC

mesos git commit: Fixed JsonTest.Find.

Repository: mesos
Updated Branches:
  refs/heads/master f9e17a9cc -> 149f4c55b


Fixed JsonTest.Find.


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/149f4c55
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/149f4c55
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/149f4c55

Branch: refs/heads/master
Commit: 149f4c55b951e5eaea1cb5faf400089dd36c355a
Parents: f9e17a9
Author: Benjamin Mahler <bm...@apache.org>
Authored: Tue Jul 5 23:26:13 2016 -0700
Committer: Benjamin Mahler <bm...@apache.org>
Committed: Tue Jul 5 23:26:29 2016 -0700

----------------------------------------------------------------------
 3rdparty/stout/tests/json_tests.cpp | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/149f4c55/3rdparty/stout/tests/json_tests.cpp
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/json_tests.cpp b/3rdparty/stout/tests/json_tests.cpp
index ec8174e..2bc4c88 100644
--- a/3rdparty/stout/tests/json_tests.cpp
+++ b/3rdparty/stout/tests/json_tests.cpp
@@ -337,7 +337,10 @@ TEST(JsonTest, Find)
   EXPECT_ERROR(object.find<JSON::String>("nested1[1].nested2.string"));
   EXPECT_ERROR(object.find<JSON::String>("nested1.nested2[1].string"));
   EXPECT_ERROR(object.find<JSON::String>("nested1.nested2.string[1]"));
-  EXPECT_ERROR(object.find<JSON::String>("nested1.nested2.null[1]"));
+
+  // Indexing into a null is the same as a non-existent field.
+  EXPECT_NONE(object.find<JSON::String>("nested1.nested2.null[1]"));
+  EXPECT_NONE(object.find<JSON::String>("nested1.nested2.missing[1]"));
 
   // Null entries are found when looking for a matching type (Null or Value).
   EXPECT_SOME_EQ(