Skip to content

Commit

Permalink
[test] add parse_json_string test
Browse files Browse the repository at this point in the history
  • Loading branch information
greole committed Dec 5, 2024
1 parent 62d4f08 commit 55997e4
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions extensions/test/config/json_config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: BSD-3-Clause

#include <stdexcept>
#include <string>

#include <gtest/gtest.h>
#include <nlohmann/json.hpp>
Expand Down Expand Up @@ -74,12 +75,11 @@ TEST(JsonConfig, ReadInput)

TEST(JsonConfig, ReadInputString)
{
std::string =
R"({"item": 4,
"array": [3.0, 4.5],
"map": {"bool": false}})";
std::string json_string = R"({"item": 4,
"array": [3.0, 4.5],
"map": {"bool": false}})";

auto ptree = gko::ext::config::parse_json_string(d);
auto ptree = gko::ext::config::parse_json_string(json_string);

auto& child_array = ptree.get("array").get_array();
auto& child_map = ptree.get("map").get_map();
Expand Down

0 comments on commit 55997e4

Please sign in to comment.