comparison data/fileio/test/CSVStreamWriterTest.h @ 1679:0d89abd631ac single-point

Re-add the toDelimitedDataString stuff
author Chris Cannam
date Thu, 28 Mar 2019 16:03:36 +0000
parents 513192aa9b03
children 21c792334c2e
comparison
equal deleted inserted replaced
1678:1078f0ef3012 1679:0d89abd631ac
301 startFrame += 8; 301 startFrame += 8;
302 } 302 }
303 // qDebug("Create Expected Output\n"); 303 // qDebug("Create Expected Output\n");
304 304
305 // NB. removed end line break 305 // NB. removed end line break
306 const auto expectedOutput = notes.toDelimitedDataString(",").trimmed(); 306 const auto expectedOutput =
307 notes.toDelimitedDataString(",", {}, 0, notes.getEndFrame())
308 .trimmed();
307 309
308 StubReporter reporter { []() -> bool { return false; } }; 310 StubReporter reporter { []() -> bool { return false; } };
309 std::ostringstream oss; 311 std::ostringstream oss;
310 // qDebug("End frame: %lld", (long long int)notes.getEndFrame()); 312 // qDebug("End frame: %lld", (long long int)notes.getEndFrame());
311 // qDebug("Write streaming\n"); 313 // qDebug("Write streaming\n");
319 ); 321 );
320 322
321 // qDebug("\n->>%s<<-\n", expectedOutput.toLocal8Bit().data()); 323 // qDebug("\n->>%s<<-\n", expectedOutput.toLocal8Bit().data());
322 // qDebug("\n->>%s<<-\n", oss.str().c_str()); 324 // qDebug("\n->>%s<<-\n", oss.str().c_str());
323 QVERIFY( wroteSparseModel == true ); 325 QVERIFY( wroteSparseModel == true );
326 QVERIFY( oss.str() != std::string() );
324 QVERIFY( oss.str() == expectedOutput.toStdString() ); 327 QVERIFY( oss.str() == expectedOutput.toStdString() );
325 } 328 }
326 }; 329 };
327 330
328 #endif 331 #endif