File: tst_xmlelement.cpp

package info (click to toggle)
kdsoap 2.2.0%2Bdfsg-3
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 3,000 kB
  • sloc: cpp: 19,877; python: 63; makefile: 13
file content (38 lines) | stat: -rw-r--r-- 742 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include "xmlelement.h"

#include <QTest>

using namespace XSD;

class XmlElementTest : public QObject
{
    Q_OBJECT
private Q_SLOTS:
    void constructors();
    void assignment();
};

void XmlElementTest::constructors()
{
    XmlElement e("ns1");
    e.setName("elem");
    XmlElement copy(e);
    QCOMPARE(copy.name(), QString("elem"));
    XmlElement moved = std::move(e);
    QCOMPARE(moved.name(), QString("elem"));
}

void XmlElementTest::assignment()
{
    XmlElement e("ns1");
    e.setName("elem");
    XmlElement copy;
    copy = e;
    QCOMPARE(copy.name(), QString("elem"));
    XmlElement moved;
    moved = std::move(e);
    QCOMPARE(moved.name(), QString("elem"));
}

QTEST_MAIN(XmlElementTest)
#include "tst_xmlelement.moc"