@@ -13,7 +13,7 @@ struct Server2 {
13
13
JsonRpc2Server server;
14
14
TestServerConnector connector;
15
15
16
- Server2 () : connector(server) {}
16
+ Server2 () : server(), connector(server) {}
17
17
};
18
18
19
19
TEST_CASE_METHOD (Server2, " v2_method_not_found" , TEST_MODULE) {
@@ -61,9 +61,10 @@ TEST_CASE_METHOD(Server2, "v2_malformed_requests", TEST_MODULE) {
61
61
62
62
enum class category { ord, cc };
63
63
64
- NLOHMANN_JSON_SERIALIZE_ENUM (category, {{category::ord, " order" }, {category::cc, " cc" }});
64
+ NLOHMANN_JSON_SERIALIZE_ENUM (category, {{category::ord, " order" }, {category::cc, " cc" }})
65
65
66
66
struct product {
67
+ product () : id (), price (), name (), cat () {}
67
68
int id;
68
69
double price;
69
70
string name;
@@ -75,6 +76,8 @@ void from_json(const json &j, product &p);
75
76
76
77
class TestServer {
77
78
public:
79
+ TestServer () : param_proc(), param_a(), param_b(), catalog() {}
80
+
78
81
unsigned int add_function (unsigned int a, unsigned int b) {
79
82
this ->param_a = a;
80
83
this ->param_b = b;
@@ -95,8 +98,8 @@ class TestServer {
95
98
};
96
99
97
100
void dirty_notification () { throw std::exception (); }
98
- int dirty_method (int a, int b) { throw std::exception (); }
99
- int dirty_method2 (int a, int b) { throw - 7 ; }
101
+ int dirty_method (int a, int b) { to_string (a+b); throw std::exception (); }
102
+ int dirty_method2 (int a, int b) { throw (a+b) ; }
100
103
101
104
string param_proc;
102
105
int param_a;
0 commit comments