summaryrefslogtreecommitdiffstats
path: root/tests/auto/cpptest/q3dsurface/tst_surface.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/cpptest/q3dsurface/tst_surface.cpp')
-rw-r--r--tests/auto/cpptest/q3dsurface/tst_surface.cpp52
1 files changed, 13 insertions, 39 deletions
diff --git a/tests/auto/cpptest/q3dsurface/tst_surface.cpp b/tests/auto/cpptest/q3dsurface/tst_surface.cpp
index fc1068e3..b27dfa0c 100644
--- a/tests/auto/cpptest/q3dsurface/tst_surface.cpp
+++ b/tests/auto/cpptest/q3dsurface/tst_surface.cpp
@@ -1,31 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2016 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the Qt Data Visualization module of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:GPL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 3 or (at your option) any later version
-** approved by the KDE Free Qt Foundation. The licenses are as published by
-** the Free Software Foundation and appearing in the file LICENSE.GPL3
-** included in the packaging of this file. Please review the following
-** information to ensure the GNU General Public License requirements will
-** be met: https://www.gnu.org/licenses/gpl-3.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2016 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QtTest>
@@ -109,7 +83,7 @@ void tst_surface::construct()
void tst_surface::initialProperties()
{
QVERIFY(m_graph);
- QCOMPARE(m_graph->seriesList().length(), 0);
+ QCOMPARE(m_graph->seriesList().size(), 0);
QVERIFY(!m_graph->selectedSeries());
QCOMPARE(m_graph->flipHorizontalGrid(), false);
QCOMPARE(m_graph->axisX()->orientation(), QAbstract3DAxis::AxisOrientationX);
@@ -184,9 +158,9 @@ void tst_surface::invalidProperties()
m_graph->setLocale(QLocale("XX"));
QCOMPARE(m_graph->selectionMode(), QAbstract3DGraph::SelectionItem);
- QCOMPARE(m_graph->aspectRatio(), -1.0/*2.0*/); // TODO: Fix once QTRD-3367 is done
- QCOMPARE(m_graph->horizontalAspectRatio(), -1.0/*0.0*/); // TODO: Fix once QTRD-3367 is done
- QCOMPARE(m_graph->reflectivity(), -1.0/*0.5*/); // TODO: Fix once QTRD-3367 is done
+ QCOMPARE(m_graph->aspectRatio(), 2.0);
+ QCOMPARE(m_graph->horizontalAspectRatio(), 0.0);
+ QCOMPARE(m_graph->reflectivity(), 0.5);
QCOMPARE(m_graph->locale(), QLocale("C"));
}
@@ -194,7 +168,7 @@ void tst_surface::addSeries()
{
m_graph->addSeries(newSeries());
- QCOMPARE(m_graph->seriesList().length(), 1);
+ QCOMPARE(m_graph->seriesList().size(), 1);
QVERIFY(!m_graph->selectedSeries());
}
@@ -208,7 +182,7 @@ void tst_surface::addMultipleSeries()
m_graph->addSeries(series2);
m_graph->addSeries(series3);
- QCOMPARE(m_graph->seriesList().length(), 3);
+ QCOMPARE(m_graph->seriesList().size(), 3);
}
void tst_surface::selectSeries()
@@ -218,7 +192,7 @@ void tst_surface::selectSeries()
m_graph->addSeries(series);
m_graph->seriesList()[0]->setSelectedPoint(QPoint(0, 0));
- QCOMPARE(m_graph->seriesList().length(), 1);
+ QCOMPARE(m_graph->seriesList().size(), 1);
QCOMPARE(m_graph->selectedSeries(), series);
m_graph->clearSelection();
@@ -231,7 +205,7 @@ void tst_surface::removeSeries()
m_graph->addSeries(series);
m_graph->removeSeries(series);
- QCOMPARE(m_graph->seriesList().length(), 0);
+ QCOMPARE(m_graph->seriesList().size(), 0);
delete series;
}
@@ -250,14 +224,14 @@ void tst_surface::removeMultipleSeries()
QCOMPARE(m_graph->selectedSeries(), series);
m_graph->removeSeries(series);
- QCOMPARE(m_graph->seriesList().length(), 2);
+ QCOMPARE(m_graph->seriesList().size(), 2);
QVERIFY(!m_graph->selectedSeries());
m_graph->removeSeries(series2);
- QCOMPARE(m_graph->seriesList().length(), 1);
+ QCOMPARE(m_graph->seriesList().size(), 1);
m_graph->removeSeries(series3);
- QCOMPARE(m_graph->seriesList().length(), 0);
+ QCOMPARE(m_graph->seriesList().size(), 0);
delete series;
delete series2;