Lines Matching full:out

36   std::string out;  in TEST()  local
37 EXPECT_TRUE(GetStringFromJson(in_s, &out)); in TEST()
38 EXPECT_EQ("foo", out); in TEST()
39 EXPECT_TRUE(GetStringFromJson(in_sn, &out)); in TEST()
40 EXPECT_EQ("99", out); in TEST()
41 EXPECT_TRUE(GetStringFromJson(in_si, &out)); in TEST()
42 EXPECT_EQ("-99", out); in TEST()
43 EXPECT_TRUE(GetStringFromJson(in_i, &out)); in TEST()
44 EXPECT_EQ("-12", out); in TEST()
45 EXPECT_TRUE(GetStringFromJson(in_n, &out)); in TEST()
46 EXPECT_EQ("12", out); in TEST()
47 EXPECT_TRUE(GetStringFromJson(in_u, &out)); in TEST()
48 EXPECT_EQ("34", out); in TEST()
49 EXPECT_TRUE(GetStringFromJson(in_b, &out)); in TEST()
50 EXPECT_EQ("true", out); in TEST()
52 EXPECT_FALSE(GetStringFromJson(bad_a, &out)); in TEST()
53 EXPECT_FALSE(GetStringFromJson(bad_o, &out)); in TEST()
57 int out; in TEST() local
58 EXPECT_TRUE(GetIntFromJson(in_sn, &out)); in TEST()
59 EXPECT_EQ(99, out); in TEST()
60 EXPECT_TRUE(GetIntFromJson(in_si, &out)); in TEST()
61 EXPECT_EQ(-99, out); in TEST()
62 EXPECT_TRUE(GetIntFromJson(in_n, &out)); in TEST()
63 EXPECT_EQ(12, out); in TEST()
64 EXPECT_TRUE(GetIntFromJson(in_i, &out)); in TEST()
65 EXPECT_EQ(-12, out); in TEST()
66 EXPECT_TRUE(GetIntFromJson(in_u, &out)); in TEST()
67 EXPECT_EQ(34, out); in TEST()
68 EXPECT_TRUE(GetIntFromJson(in_b, &out)); in TEST()
69 EXPECT_EQ(1, out); in TEST()
70 EXPECT_FALSE(GetIntFromJson(in_s, &out)); in TEST()
71 EXPECT_FALSE(GetIntFromJson(big_sn, &out)); in TEST()
72 EXPECT_FALSE(GetIntFromJson(big_si, &out)); in TEST()
73 EXPECT_FALSE(GetIntFromJson(big_u, &out)); in TEST()
74 EXPECT_FALSE(GetIntFromJson(bad_a, &out)); in TEST()
75 EXPECT_FALSE(GetIntFromJson(bad_o, &out)); in TEST()
79 unsigned int out; in TEST() local
80 EXPECT_TRUE(GetUIntFromJson(in_sn, &out)); in TEST()
81 EXPECT_EQ(99U, out); in TEST()
82 EXPECT_TRUE(GetUIntFromJson(in_n, &out)); in TEST()
83 EXPECT_EQ(12U, out); in TEST()
84 EXPECT_TRUE(GetUIntFromJson(in_u, &out)); in TEST()
85 EXPECT_EQ(34U, out); in TEST()
86 EXPECT_TRUE(GetUIntFromJson(in_b, &out)); in TEST()
87 EXPECT_EQ(1U, out); in TEST()
88 EXPECT_TRUE(GetUIntFromJson(big_u, &out)); in TEST()
89 EXPECT_EQ(0xFFFFFFFFU, out); in TEST()
90 EXPECT_FALSE(GetUIntFromJson(in_s, &out)); in TEST()
92 // EXPECT_FALSE(GetUIntFromJson(in_si, &out)); in TEST()
93 EXPECT_FALSE(GetUIntFromJson(in_i, &out)); in TEST()
94 EXPECT_FALSE(GetUIntFromJson(big_sn, &out)); in TEST()
95 EXPECT_FALSE(GetUIntFromJson(big_si, &out)); in TEST()
96 EXPECT_FALSE(GetUIntFromJson(bad_a, &out)); in TEST()
97 EXPECT_FALSE(GetUIntFromJson(bad_o, &out)); in TEST()
101 bool out; in TEST() local
102 EXPECT_TRUE(GetBoolFromJson(in_sb, &out)); in TEST()
103 EXPECT_EQ(true, out); in TEST()
104 EXPECT_TRUE(GetBoolFromJson(in_n, &out)); in TEST()
105 EXPECT_EQ(true, out); in TEST()
106 EXPECT_TRUE(GetBoolFromJson(in_i, &out)); in TEST()
107 EXPECT_EQ(true, out); in TEST()
108 EXPECT_TRUE(GetBoolFromJson(in_u, &out)); in TEST()
109 EXPECT_EQ(true, out); in TEST()
110 EXPECT_TRUE(GetBoolFromJson(in_b, &out)); in TEST()
111 EXPECT_EQ(true, out); in TEST()
112 EXPECT_TRUE(GetBoolFromJson(big_u, &out)); in TEST()
113 EXPECT_EQ(true, out); in TEST()
114 EXPECT_FALSE(GetBoolFromJson(in_s, &out)); in TEST()
115 EXPECT_FALSE(GetBoolFromJson(in_sn, &out)); in TEST()
116 EXPECT_FALSE(GetBoolFromJson(in_si, &out)); in TEST()
117 EXPECT_FALSE(GetBoolFromJson(big_sn, &out)); in TEST()
118 EXPECT_FALSE(GetBoolFromJson(big_si, &out)); in TEST()
119 EXPECT_FALSE(GetBoolFromJson(bad_a, &out)); in TEST()
120 EXPECT_FALSE(GetBoolFromJson(bad_o, &out)); in TEST()
124 double out; in TEST() local
125 EXPECT_TRUE(GetDoubleFromJson(in_sn, &out)); in TEST()
126 EXPECT_EQ(99, out); in TEST()
127 EXPECT_TRUE(GetDoubleFromJson(in_si, &out)); in TEST()
128 EXPECT_EQ(-99, out); in TEST()
129 EXPECT_TRUE(GetDoubleFromJson(in_sd, &out)); in TEST()
130 EXPECT_EQ(1.2, out); in TEST()
131 EXPECT_TRUE(GetDoubleFromJson(in_n, &out)); in TEST()
132 EXPECT_EQ(12, out); in TEST()
133 EXPECT_TRUE(GetDoubleFromJson(in_i, &out)); in TEST()
134 EXPECT_EQ(-12, out); in TEST()
135 EXPECT_TRUE(GetDoubleFromJson(in_u, &out)); in TEST()
136 EXPECT_EQ(34, out); in TEST()
137 EXPECT_TRUE(GetDoubleFromJson(in_b, &out)); in TEST()
138 EXPECT_EQ(1, out); in TEST()
139 EXPECT_TRUE(GetDoubleFromJson(in_d, &out)); in TEST()
140 EXPECT_EQ(1.2, out); in TEST()
141 EXPECT_FALSE(GetDoubleFromJson(in_s, &out)); in TEST()
145 Json::Value a, out; in TEST() local
150 EXPECT_TRUE(GetValueFromJsonArray(a, 0, &out)); in TEST()
151 EXPECT_TRUE(GetValueFromJsonArray(a, 3, &out)); in TEST()
152 EXPECT_FALSE(GetValueFromJsonArray(a, 99, &out)); in TEST()
153 EXPECT_FALSE(GetValueFromJsonArray(a, 0xFFFFFFFF, &out)); in TEST()
157 Json::Value o, out; in TEST() local
162 EXPECT_TRUE(GetValueFromJsonObject(o, "int", &out)); in TEST()
163 EXPECT_TRUE(GetValueFromJsonObject(o, "bool", &out)); in TEST()
164 EXPECT_FALSE(GetValueFromJsonObject(o, "foo", &out)); in TEST()
165 EXPECT_FALSE(GetValueFromJsonObject(o, "", &out)); in TEST()
189 Json::Value out = ValueVectorToJsonArray(in); in TEST() local
190 EXPECT_EQ(in.size(), out.size()); in TEST()
192 EXPECT_EQ(in[i].asString(), out[i].asString()); in TEST()
195 EXPECT_EQ(inj, out); in TEST()
205 Json::Value out = IntVectorToJsonArray(in); in TEST() local
206 EXPECT_EQ(in.size(), out.size()); in TEST()
208 EXPECT_EQ(in[i], out[i].asInt()); in TEST()
211 EXPECT_EQ(inj, out); in TEST()
221 Json::Value out = UIntVectorToJsonArray(in); in TEST() local
222 EXPECT_EQ(in.size(), out.size()); in TEST()
224 EXPECT_EQ(in[i], out[i].asUInt()); in TEST()
227 EXPECT_EQ(inj, out); in TEST()
237 Json::Value out = StringVectorToJsonArray(in); in TEST() local
238 EXPECT_EQ(in.size(), out.size()); in TEST()
240 EXPECT_EQ(in[i], out[i].asString()); in TEST()
243 EXPECT_EQ(inj, out); in TEST()
253 Json::Value out = BoolVectorToJsonArray(in); in TEST() local
254 EXPECT_EQ(in.size(), out.size()); in TEST()
256 EXPECT_EQ(in[i], out[i].asBool()); in TEST()
259 EXPECT_EQ(inj, out); in TEST()
269 Json::Value out = DoubleVectorToJsonArray(in); in TEST() local
270 EXPECT_EQ(in.size(), out.size()); in TEST()
272 EXPECT_EQ(in[i], out[i].asDouble()); in TEST()
275 EXPECT_EQ(inj, out); in TEST()