comparison UnitTests/ServerIndex.cpp @ 193:a1b9d1e1497b

failed attempt to compile with linux standard base
author Sebastien Jodogne <s.jodogne@gmail.com>
date Tue, 13 Nov 2012 14:02:28 +0100
parents b6cef9d45cc3
children 530a25320461
comparison
equal deleted inserted replaced
192:c56dc32266e0 193:a1b9d1e1497b
196 index.AttachChild(a[2], a[4]); 196 index.AttachChild(a[2], a[4]);
197 index.AttachChild(a[1], a[6]); 197 index.AttachChild(a[1], a[6]);
198 index.AttachChild(a[0], a[5]); 198 index.AttachChild(a[0], a[5]);
199 index.AttachChild(a[5], a[7]); 199 index.AttachChild(a[5], a[7]);
200 200
201 {
202 Json::Value j;
203 index.GetChildren(j, a[0]);
204 ASSERT_EQ(2, j.size());
205 ASSERT_TRUE((j[0u] == "b" && j[1u] == "f") ||
206 (j[1u] == "b" && j[0u] == "f"));
207
208 index.GetChildren(j, a[1]);
209 ASSERT_EQ(2, j.size());
210 ASSERT_TRUE((j[0u] == "c" && j[1u] == "g") ||
211 (j[1u] == "c" && j[0u] == "g"));
212
213 index.GetChildren(j, a[2]);
214 ASSERT_EQ(2, j.size());
215 ASSERT_TRUE((j[0u] == "d" && j[1u] == "e") ||
216 (j[1u] == "d" && j[0u] == "e"));
217
218 index.GetChildren(j, a[3]); ASSERT_EQ(0, j.size());
219 index.GetChildren(j, a[4]); ASSERT_EQ(0, j.size());
220 index.GetChildren(j, a[5]); ASSERT_EQ(1, j.size()); ASSERT_EQ("h", j[0u].asString());
221 index.GetChildren(j, a[6]); ASSERT_EQ(0, j.size());
222 index.GetChildren(j, a[7]); ASSERT_EQ(0, j.size());
223 }
224
201 listener.Reset(); 225 listener.Reset();
202 index.DeleteResource(a[3]); 226 index.DeleteResource(a[3]);
203 ASSERT_EQ("c", listener.ancestorId_); 227 ASSERT_EQ("c", listener.ancestorId_);
204 ASSERT_EQ(ResourceType_Series, listener.ancestorType_); 228 ASSERT_EQ(ResourceType_Series, listener.ancestorType_);
205 229