Ejemplo n.º 1
0
void PictureTest::storeTestExtern()
{
  KABC::Picture picture;

  picture.setUrl( QLatin1String( "http://myhomepage.com/foto.png" ), QLatin1String( "png" ) );

  QVERIFY( picture.isEmpty() == false );
  QVERIFY( picture.isIntern() == false );
  QVERIFY( picture.type() == QLatin1String( "png" ) );
  QVERIFY( picture.url() == QLatin1String( "http://myhomepage.com/foto.png" ) );
}
Ejemplo n.º 2
0
void PictureTest::storeTestInternRawData()
{
  KABC::Picture picture;

  picture.setRawData( testImageRawPNG(), QLatin1String( "png" ) );

  QVERIFY( picture.isEmpty() == false );
  QVERIFY( picture.isIntern() == true );
  QVERIFY( picture.type() == QLatin1String( "png" ) );
  QVERIFY( picture.rawData() == testImageRawPNG() );
  QVERIFY( picture.data() == testImage() );
}
Ejemplo n.º 3
0
void PictureTest::emptyTest()
{
  KABC::Picture picture;

  QVERIFY( picture.isEmpty() );
}