comparison data/model/test/TestSparseModels.h @ 1663:a77a7e8c085c single-point

Update ImageModel
author Chris Cannam
date Fri, 22 Mar 2019 17:49:10 +0000
parents 628ffbb05856
children 69ab62d378bf
comparison
equal deleted inserted replaced
1662:628ffbb05856 1663:a77a7e8c085c
251 void path_xml() { 251 void path_xml() {
252 PathModel m(100, 10, false); 252 PathModel m(100, 10, false);
253 PathPoint p1(20, 30); 253 PathPoint p1(20, 30);
254 PathPoint p2(40, 60); 254 PathPoint p2(40, 60);
255 PathPoint p3(50, 49); 255 PathPoint p3(50, 49);
256 m.addPoint(p1); 256 m.add(p1);
257 m.addPoint(p2); 257 m.add(p2);
258 m.addPoint(p3); 258 m.add(p3);
259 QString xml; 259 QString xml;
260 QTextStream str(&xml, QIODevice::WriteOnly); 260 QTextStream str(&xml, QIODevice::WriteOnly);
261 m.toXml(str); 261 m.toXml(str);
262 str.flush(); 262 str.flush();
263 263
273 cerr << "Obtained xml:\n" << xml 273 cerr << "Obtained xml:\n" << xml
274 << "\nExpected:\n" << expected << endl; 274 << "\nExpected:\n" << expected << endl;
275 } 275 }
276 QCOMPARE(xml, expected); 276 QCOMPARE(xml, expected);
277 } 277 }
278 278
279 }; 279 };
280 280
281 #endif 281 #endif