Skip to content

Commit

Permalink
reAdd removed test
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-penev committed Mar 21, 2024
1 parent a50813f commit 60a8e7b
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion test/test_interpreter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,24 @@ TEST_SUITE("execute_request")
{
TEST_CASE("stl")
{
xcpp::interpreter interpreter(0, nullptr);
std::vector<const char*> Args = {"stl-test-case", "-v"};
xcpp::interpreter interpreter((int)Args.size(), Args.data());
std::string code = "#include <vector>";
nl::json user_expressions = nl::json::object();
nl::json result = interpreter.execute_request(
code,
/*silent=*/false,
/*store_history=*/false,
user_expressions,
/*allow_stdin=*/false
);
REQUIRE(result["status"] == "ok");
}

TEST_CASE("fetch_documentation")
{
std::vector<const char*> Args = {/*"-v", "resource-dir", "....."*/};
xcpp::interpreter interpreter((int)Args.size(), Args.data());

std::string code = "?std::vector";
std::string inspect_result = "https://en.cppreference.com/w/cpp/container/vector";
Expand Down

0 comments on commit 60a8e7b

Please # to comment.