File tree 4 files changed +1
-37
lines changed 4 files changed +1
-37
lines changed Original file line number Diff line number Diff line change @@ -24,9 +24,6 @@ namespace xcpp
24
24
XEUS_CPP_API
25
25
void stop_handler (int sig);
26
26
27
- XEUS_CPP_API
28
- interpreter_ptr build_interpreter (int argc, char ** argv);
29
-
30
27
XEUS_CPP_API
31
28
std::string retrieve_tagconf_dir ();
32
29
Original file line number Diff line number Diff line change @@ -59,7 +59,7 @@ int main(int argc, char* argv[])
59
59
signal (SIGINT, xcpp::stop_handler);
60
60
61
61
std::string file_name = xeus::extract_filename (argc, argv);
62
- interpreter_ptr interpreter = xcpp::build_interpreter (argc, argv);
62
+ auto interpreter = std::make_unique< xcpp::interpreter> (argc, argv);
63
63
std::unique_ptr<xeus::xcontext> context = xeus::make_zmq_context ();
64
64
65
65
if (!file_name.empty ())
Original file line number Diff line number Diff line change @@ -50,21 +50,6 @@ namespace xcpp
50
50
exit (0 );
51
51
}
52
52
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
-
68
53
std::string retrieve_tagconf_dir ()
69
54
{
70
55
const char * tagconf_dir_env = std::getenv (" XCPP_TAGCONFS_DIR" );
Original file line number Diff line number Diff line change @@ -344,24 +344,6 @@ TEST_SUITE("trim"){
344
344
345
345
}
346
346
347
- TEST_SUITE (" build_interpreter" )
348
- {
349
- // This test case checks if the function `build_interpreter` returns a non-null pointer
350
- // when valid arguments are passed. It sets up a scenario with valid command line arguments
351
- // and checks if the function returns a non-null pointer.
352
- TEST_CASE (" build_interpreter_pointer_not_null" )
353
- {
354
- char arg1[] = " program_name" ;
355
- char arg2[] = " -option1" ;
356
- char * argv[] = {arg1, arg2};
357
- int argc = 2 ;
358
-
359
- interpreter_ptr interp_ptr = xcpp::build_interpreter (argc, argv);
360
-
361
- REQUIRE (interp_ptr != nullptr );
362
- }
363
- }
364
-
365
347
TEST_SUITE (" is_match_magics_manager" )
366
348
{
367
349
// This test case checks if the function `is_match` correctly identifies strings that match
You can’t perform that action at this time.
0 commit comments