MCPcopy Create free account
hub / github.com/SqliteModernCpp/sqlite_modern_cpp / TestData

Method TestData

tests/trycatchblocks.cc:54–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52 }
53
54 bool TestData( void ) {
55 try {
56 string username, timestamp, ip, request;
57
58 db << "select username, timestamp, ip, request from log_request where username = ?"
59 << "test"
60 >> std::tie(username, timestamp, ip, request);
61
62 if ( username == "test" && ip == "127.0.0.1" && request == "hello world" ) {
63 return true;
64 }
65 } catch ( const std::exception& e ) {
66 std::cout << e.what() << std::endl;
67 }
68
69 return false;
70 }
71};
72
73int main( void )

Callers 1

mainFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected