File tree Expand file tree Collapse file tree 3 files changed +6
-3
lines changed
regression/libcprover-cpp Expand file tree Collapse file tree 3 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ int main(int argc, char *argv[])
2323 try
2424 {
2525 std::cout << " Hello from API stub" << std::endl;
26+ std::cout << " Working from C++ API version " ;
2627
2728 // Convert argv to vector of strings for initialize_goto_model
2829 std::vector<std::string> arguments (argv + 1 , argv + argc);
@@ -35,6 +36,7 @@ int main(int argc, char *argv[])
3536
3637 // Initialise API dependencies and global configuration in one step.
3738 api_sessiont api (api_options);
39+ std::cout << *api.get_api_version () << std::endl;
3840
3941 // Demonstrate the loading of a goto-model from the command line arguments
4042 api.set_message_callback (print_messages_to_stdout, nullptr );
Original file line number Diff line number Diff line change 88#include < util/message.h>
99#include < util/options.h>
1010#include < util/ui_message.h>
11+ #include < util/version.h>
1112
1213#include < goto-programs/goto_model.h>
1314#include < goto-programs/initialize_goto_model.h>
@@ -34,7 +35,7 @@ extern configt config;
3435
3536std::unique_ptr<std::string> api_sessiont::get_api_version () const
3637{
37- return util_make_unique<std::string>(std::string{" 0.1 " });
38+ return util_make_unique<std::string>(std::string{CBMC_VERSION });
3839}
3940
4041struct api_session_implementationt
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ mod tests {
8989 let client = cprover_api:: new_api_session ( ) ;
9090 let result = client. get_api_version ( ) ;
9191
92- let_cxx_string ! ( expected_version = "0.1 " ) ;
93- assert_eq ! ( * result, * expected_version) ;
92+ let_cxx_string ! ( expected_version = "5.79.0 " ) ;
93+ assert ! ( * result > * expected_version) ;
9494 }
9595
9696 #[ test]
You can’t perform that action at this time.
0 commit comments