@@ -889,77 +889,77 @@ TEST_SUITE("xinspect"){
889
889
}
890
890
}
891
891
892
- // TEST_SUITE("xassist"){
892
+ TEST_SUITE (" xassist" ){
893
893
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" ;
898
898
899
- // StreamRedirectRAII redirect(std::cerr);
899
+ StreamRedirectRAII redirect (std::cerr);
900
900
901
- // assist(line, cell);
901
+ assist (line, cell);
902
902
903
- // REQUIRE(redirect.getCaptured() == "Model not found.\n");
903
+ REQUIRE (redirect.getCaptured () == " Model not found.\n " );
904
904
905
- // }
905
+ }
906
906
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" ;
911
911
912
- // assist(line, cell);
912
+ assist (line, cell);
913
913
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);
917
917
918
- // REQUIRE(content == "1234");
919
- // infile.close();
918
+ REQUIRE (content == " 1234" );
919
+ infile.close ();
920
920
921
- // StreamRedirectRAII redirect(std::cerr);
921
+ StreamRedirectRAII redirect (std::cerr);
922
922
923
- // assist("%%xassist gemini", "hello");
923
+ assist (" %%xassist gemini" , " hello" );
924
924
925
- // REQUIRE(!redirect.getCaptured().empty());
925
+ REQUIRE (!redirect.getCaptured ().empty ());
926
926
927
- // std::remove("gemini_api_key.txt");
928
- // }
927
+ std::remove (" gemini_api_key.txt" );
928
+ }
929
929
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" ;
934
934
935
- // StreamRedirectRAII redirect(std::cerr);
935
+ StreamRedirectRAII redirect (std::cerr);
936
936
937
- // assist(line, cell);
937
+ assist (line, cell);
938
938
939
- // REQUIRE(!redirect.getCaptured().empty());
940
- // }
939
+ REQUIRE (!redirect.getCaptured ().empty ());
940
+ }
941
941
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" ;
946
946
947
- // assist(line, cell);
947
+ assist (line, cell);
948
948
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);
952
952
953
- // REQUIRE(content == "1234");
954
- // infile.close();
953
+ REQUIRE (content == " 1234" );
954
+ infile.close ();
955
955
956
- // StreamRedirectRAII redirect(std::cerr);
956
+ StreamRedirectRAII redirect (std::cerr);
957
957
958
- // assist("%%xassist openai", "hello");
958
+ assist (" %%xassist openai" , " hello" );
959
959
960
- // REQUIRE(!redirect.getCaptured().empty());
960
+ REQUIRE (!redirect.getCaptured ().empty ());
961
961
962
- // std::remove("openai_api_key.txt");
963
- // }
962
+ std::remove (" openai_api_key.txt" );
963
+ }
964
964
965
- // }
965
+ }
0 commit comments