@@ -889,77 +889,77 @@ TEST_SUITE("xinspect"){
889889 }
890890}
891891
892- // TEST_SUITE("xassist"){
892+ TEST_SUITE (" xassist" ){
893893
894- // TEST_CASE("model_not_found"){
895- // xcpp::xassist assist;
896- // std::string line = "%%xassist testModel";
897- // std::string cell = "test input";
894+ TEST_CASE (" model_not_found" ){
895+ xcpp::xassist assist;
896+ std::string line = " %%xassist testModel" ;
897+ std::string cell = " test input" ;
898898
899- // StreamRedirectRAII redirect(std::cerr);
899+ StreamRedirectRAII redirect (std::cerr);
900900
901- // assist(line, cell);
901+ assist (line, cell);
902902
903- // REQUIRE(redirect.getCaptured() == "Model not found.\n");
903+ REQUIRE (redirect.getCaptured () == " Model not found.\n " );
904904
905- // }
905+ }
906906
907- // TEST_CASE("gemini_save"){
908- // xcpp::xassist assist;
909- // std::string line = "%%xassist gemini --save-key";
910- // std::string cell = "1234";
907+ TEST_CASE (" gemini_save" ){
908+ xcpp::xassist assist;
909+ std::string line = " %%xassist gemini --save-key" ;
910+ std::string cell = " 1234" ;
911911
912- // assist(line, cell);
912+ assist (line, cell);
913913
914- // std::ifstream infile("gemini_api_key.txt");
915- // std::string content;
916- // std::getline(infile, content);
914+ std::ifstream infile (" gemini_api_key.txt" );
915+ std::string content;
916+ std::getline (infile, content);
917917
918- // REQUIRE(content == "1234");
919- // infile.close();
918+ REQUIRE (content == " 1234" );
919+ infile.close ();
920920
921- // StreamRedirectRAII redirect(std::cerr);
921+ StreamRedirectRAII redirect (std::cerr);
922922
923- // assist("%%xassist gemini", "hello");
923+ assist (" %%xassist gemini" , " hello" );
924924
925- // REQUIRE(!redirect.getCaptured().empty());
925+ REQUIRE (!redirect.getCaptured ().empty ());
926926
927- // std::remove("gemini_api_key.txt");
928- // }
927+ std::remove (" gemini_api_key.txt" );
928+ }
929929
930- // TEST_CASE("gemini"){
931- // xcpp::xassist assist;
932- // std::string line = "%%xassist gemini";
933- // std::string cell = "hello";
930+ TEST_CASE (" gemini" ){
931+ xcpp::xassist assist;
932+ std::string line = " %%xassist gemini" ;
933+ std::string cell = " hello" ;
934934
935- // StreamRedirectRAII redirect(std::cerr);
935+ StreamRedirectRAII redirect (std::cerr);
936936
937- // assist(line, cell);
937+ assist (line, cell);
938938
939- // REQUIRE(!redirect.getCaptured().empty());
940- // }
939+ REQUIRE (!redirect.getCaptured ().empty ());
940+ }
941941
942- // TEST_CASE("openai"){
943- // xcpp::xassist assist;
944- // std::string line = "%%xassist openai --save-key";
945- // std::string cell = "1234";
942+ TEST_CASE (" openai" ){
943+ xcpp::xassist assist;
944+ std::string line = " %%xassist openai --save-key" ;
945+ std::string cell = " 1234" ;
946946
947- // assist(line, cell);
947+ assist (line, cell);
948948
949- // std::ifstream infile("openai_api_key.txt");
950- // std::string content;
951- // std::getline(infile, content);
949+ std::ifstream infile (" openai_api_key.txt" );
950+ std::string content;
951+ std::getline (infile, content);
952952
953- // REQUIRE(content == "1234");
954- // infile.close();
953+ REQUIRE (content == " 1234" );
954+ infile.close ();
955955
956- // StreamRedirectRAII redirect(std::cerr);
956+ StreamRedirectRAII redirect (std::cerr);
957957
958- // assist("%%xassist openai", "hello");
958+ assist (" %%xassist openai" , " hello" );
959959
960- // REQUIRE(!redirect.getCaptured().empty());
960+ REQUIRE (!redirect.getCaptured ().empty ());
961961
962- // std::remove("openai_api_key.txt");
963- // }
962+ std::remove (" openai_api_key.txt" );
963+ }
964964
965- // }
965+ }
0 commit comments