From 9337c5455222c878019ab1cd4779cc5023e73507 Mon Sep 17 00:00:00 2001 From: ljfa-ag Date: Sun, 28 Jun 2015 17:48:20 +0200 Subject: Add at method to value --- test/nbttest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'test/nbttest.cpp') diff --git a/test/nbttest.cpp b/test/nbttest.cpp index 8b4329d64f..60f090dd43 100644 --- a/test/nbttest.cpp +++ b/test/nbttest.cpp @@ -86,7 +86,7 @@ void test_tag_compound() ASSERT(comp["foo"].get_type() == tag_type::Short); ASSERT(int(comp["foo"]) == 12); - ASSERT(int16_t(comp["foo"]) == int16_t(12)); + ASSERT(int16_t(comp.at("foo")) == int16_t(12)); ASSERT(comp["bar"].get_type() == tag_type::String); ASSERT(std::string(comp["bar"]) == "baz"); @@ -96,8 +96,8 @@ void test_tag_compound() ASSERT(float(comp["baz"]) == -2.0f); comp["quux"] = tag_compound{/*{"Hello", "World"}, {"zero", 0}*/}; - ASSERT(comp["quux"].get_type() == tag_type::Compound); - ASSERT(std::string(comp["quux"]["Hello"]) == "World"); + ASSERT(comp.at("quux").get_type() == tag_type::Compound); + ASSERT(std::string(comp["quux"].at("Hello")) == "World"); tag_compound comp2/*{ {"foo", int16_t(12)}, -- cgit 0.0.5-2-1-g0f52