~ps-jenkins/qtvideo-node/utopic-proposed

« back to all changes in this revision

Viewing changes to unittests/shadervideonode/tst_shadervideonode.cpp

  • Committer: Tarmac
  • Author(s): Michael Terry
  • Date: 2013-04-24 18:30:35 UTC
  • mfrom: (27.2.2 arches)
  • Revision ID: tarmac-20130424183035-2aqbf27f0n42n1yg
Allow qtvideo-node to support all 3 major arches.

Approved by PS Jenkins bot, Łukasz Zemczak.

Show diffs side-by-side

added added

removed removed

Lines of Context:
46
46
    QVideoFrame frame(img);
47
47
 
48
48
    node.setCurrentFrame(frame);
49
 
    QCOMPARE((int)node.m_material->cameraControl(), 0);
 
49
    QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->cameraControl()),
 
50
             QVariant(QMetaType::VoidStar, 0));
50
51
 
51
 
    frame.setMetaData("CamControl", (int)cc);
 
52
    frame.setMetaData("CamControl", QVariant::fromValue((void*)cc));
52
53
    node.setCurrentFrame(frame);
53
 
    QCOMPARE((int)node.m_material->cameraControl(), (int)cc);
 
54
    QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->cameraControl()),
 
55
             QVariant(QMetaType::VoidStar, cc));
54
56
}
55
57
 
56
58
void tst_ShaderVideoNode::testMediaPlayerSetCurrentFrame()
63
65
    QVideoFrame frame(img);
64
66
 
65
67
    node.setCurrentFrame(frame);
66
 
    QCOMPARE((int)node.m_material->mediaplayerControl(), 0);
 
68
    QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->mediaplayerControl()),
 
69
             QVariant(QMetaType::VoidStar, 0));
67
70
 
68
 
    frame.setMetaData("MediaPlayerControl", (int)mp);
 
71
    frame.setMetaData("MediaPlayerControl", QVariant::fromValue((void*)mp));
69
72
    node.setCurrentFrame(frame);
70
 
    QCOMPARE((int)node.m_material->mediaplayerControl(), (int)mp);
 
73
    QCOMPARE(QVariant(QMetaType::VoidStar, node.m_material->mediaplayerControl()),
 
74
             QVariant(QMetaType::VoidStar, mp));
71
75
}
72
76
 
73
77
QTEST_MAIN(tst_ShaderVideoNode)