Reuse core host definitions across requests
This commit is contained in:
@@ -86,6 +86,16 @@ RENDER(Request& context)
|
||||
DValue nav_dash_summary = nav_dash.filter({"title"});
|
||||
check("DValue collection helpers", empty_pop.to_string() == "" && app_nav.is_list() && nav_titles["0"].to_string() == "Dashboard" && join(nav_dash_summary.keys(), ",") == "title" && nav_dash.values()["0"].to_string() == "app" && nav_dash.values()["1"].to_string() == "Dashboard", json_encode(nav_titles));
|
||||
|
||||
DValue copy_source; copy_source["nested"]["value"] = "original";
|
||||
DValue copied = copy_source;
|
||||
copied["nested"]["value"] = "copy";
|
||||
DValue move_source; move_source["nested"]["value"] = "moved";
|
||||
DValue moved = std::move(move_source);
|
||||
DValue reference_target; DValue reference; reference.set_reference(&reference_target);
|
||||
DValue reference_source; reference_source["nested"]["value"] = "target";
|
||||
reference = reference_source;
|
||||
check("DValue copy/move assignment preserves value and reference semantics", copy_source["nested"]["value"].to_string() == "original" && copied["nested"]["value"].to_string() == "copy" && moved["nested"]["value"].to_string() == "moved" && reference_target["nested"]["value"].to_string() == "target", json_encode(moved) + " / " + json_encode(reference_target));
|
||||
|
||||
DValue conv;
|
||||
conv["name"] = "ada";
|
||||
conv["count"] = "12";
|
||||
|
||||
Reference in New Issue
Block a user