Skip to content

Commit e71a7eb

Browse files
committed
removed tests for build_interpreter
1 parent 4ec318a commit e71a7eb

File tree

3 files changed

+0
-36
lines changed

3 files changed

+0
-36
lines changed

include/xeus-cpp/xutils.hpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,6 @@ namespace xcpp
2424
XEUS_CPP_API
2525
void stop_handler(int sig);
2626

27-
XEUS_CPP_API
28-
interpreter_ptr build_interpreter(int argc, char** argv);
29-
3027
XEUS_CPP_API
3128
std::string retrieve_tagconf_dir();
3229

src/xutils.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,6 @@ namespace xcpp
5050
exit(0);
5151
}
5252

53-
interpreter_ptr build_interpreter(int argc, char** argv)
54-
{
55-
std::vector<const char*> interpreter_argv(argc);
56-
interpreter_argv[0] = "xeus-cpp";
57-
58-
// Copy all arguments in the new vector excepting the process name.
59-
for (int i = 1; i < argc; i++)
60-
{
61-
interpreter_argv[i] = argv[i];
62-
}
63-
64-
interpreter_ptr interp_ptr = std::make_unique<interpreter>(argc, interpreter_argv.data());
65-
return interp_ptr;
66-
}
67-
6853
std::string retrieve_tagconf_dir()
6954
{
7055
const char* tagconf_dir_env = std::getenv("XCPP_TAGCONFS_DIR");

test/test_interpreter.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -307,24 +307,6 @@ TEST_SUITE("trim"){
307307

308308
}
309309

310-
TEST_SUITE("build_interpreter")
311-
{
312-
// This test case checks if the function `build_interpreter` returns a non-null pointer
313-
// when valid arguments are passed. It sets up a scenario with valid command line arguments
314-
// and checks if the function returns a non-null pointer.
315-
TEST_CASE("build_interpreter_pointer_not_null")
316-
{
317-
char arg1[] = "program_name";
318-
char arg2[] = "-option1";
319-
char* argv[] = {arg1, arg2};
320-
int argc = 2;
321-
322-
interpreter_ptr interp_ptr = xcpp::build_interpreter(argc, argv);
323-
324-
REQUIRE(interp_ptr != nullptr);
325-
}
326-
}
327-
328310
TEST_SUITE("is_match_magics_manager")
329311
{
330312
// This test case checks if the function `is_match` correctly identifies strings that match

0 commit comments

Comments
 (0)