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[])
23
23
try
24
24
{
25
25
std::cout << " Hello from API stub" << std::endl;
26
+ std::cout << " Working from C++ API version " ;
26
27
27
28
// Convert argv to vector of strings for initialize_goto_model
28
29
std::vector<std::string> arguments (argv + 1 , argv + argc);
@@ -35,6 +36,7 @@ int main(int argc, char *argv[])
35
36
36
37
// Initialise API dependencies and global configuration in one step.
37
38
api_sessiont api (api_options);
39
+ std::cout << *api.get_api_version () << std::endl;
38
40
39
41
// Demonstrate the loading of a goto-model from the command line arguments
40
42
api.set_message_callback (print_messages_to_stdout, nullptr );
Original file line number Diff line number Diff line change 8
8
#include < util/message.h>
9
9
#include < util/options.h>
10
10
#include < util/ui_message.h>
11
+ #include < util/version.h>
11
12
12
13
#include < goto-programs/goto_model.h>
13
14
#include < goto-programs/initialize_goto_model.h>
@@ -34,7 +35,7 @@ extern configt config;
34
35
35
36
std::unique_ptr<std::string> api_sessiont::get_api_version () const
36
37
{
37
- return util_make_unique<std::string>(std::string{" 0.1 " });
38
+ return util_make_unique<std::string>(std::string{CBMC_VERSION });
38
39
}
39
40
40
41
struct api_session_implementationt
Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ mod tests {
89
89
let client = cprover_api:: new_api_session ( ) ;
90
90
let result = client. get_api_version ( ) ;
91
91
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) ;
94
94
}
95
95
96
96
#[ test]
You can’t perform that action at this time.
0 commit comments