aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/calendar
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-05-15 10:39:51 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-05-28 08:09:33 +0200
commit0e18524a84d2aae65c54edc676d8ad7348f7d61c (patch)
tree4e61bfe0b80ed66fbe888a90b5bb3550d14c7747 /tests/auto/calendar
parentf91f9587ea27b5d5d802f1d75982792e988308f5 (diff)
Remove Qt Labs Calendar
This is getting its own repository as part of the move to the marketplace. Task-number: QTBUG-84172 Pick-to: 5.15 Change-Id: I2f963c298d6ef95e0832f95aa1e1ea809f4867a2 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/auto/calendar')
-rw-r--r--tests/auto/calendar/CMakeLists.txt25
-rw-r--r--tests/auto/calendar/calendar.pro12
-rw-r--r--tests/auto/calendar/data/tst_calendarmodel.qml125
-rw-r--r--tests/auto/calendar/data/tst_dayofweekrow.qml95
-rw-r--r--tests/auto/calendar/data/tst_monthgrid.qml284
-rw-r--r--tests/auto/calendar/data/tst_weeknumbercolumn.qml134
-rw-r--r--tests/auto/calendar/tst_calendar.cpp38
7 files changed, 0 insertions, 713 deletions
diff --git a/tests/auto/calendar/CMakeLists.txt b/tests/auto/calendar/CMakeLists.txt
deleted file mode 100644
index 34937d14..00000000
--- a/tests/auto/calendar/CMakeLists.txt
+++ /dev/null
@@ -1,25 +0,0 @@
-# Generated from calendar.pro.
-
-#####################################################################
-## tst_calendar Test:
-#####################################################################
-
-# Collect test data
-file(GLOB_RECURSE test_data_glob
- RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_SOURCE_DIR}/data/tst_*)
-list(APPEND test_data ${test_data_glob})
-
-qt_add_test(tst_calendar
- GUI
- QMLTEST
- SOURCES
- tst_calendar.cpp
- PUBLIC_LIBRARIES
- Qt::Gui
- TESTDATA ${test_data}
-)
-
-#### Keys ignored in scope 1:.:.:calendar.pro:<TRUE>:
-# OTHER_FILES = "$$PWD/data/*.qml"
-# TEMPLATE = "app"
diff --git a/tests/auto/calendar/calendar.pro b/tests/auto/calendar/calendar.pro
deleted file mode 100644
index 9fdf20ad..00000000
--- a/tests/auto/calendar/calendar.pro
+++ /dev/null
@@ -1,12 +0,0 @@
-TEMPLATE = app
-TARGET = tst_calendar
-CONFIG += qmltestcase
-
-SOURCES += \
- $$PWD/tst_calendar.cpp
-
-OTHER_FILES += \
- $$PWD/data/*.qml
-
-TESTDATA += \
- $$PWD/data/tst_*
diff --git a/tests/auto/calendar/data/tst_calendarmodel.qml b/tests/auto/calendar/data/tst_calendarmodel.qml
deleted file mode 100644
index ccadd488..00000000
--- a/tests/auto/calendar/data/tst_calendarmodel.qml
+++ /dev/null
@@ -1,125 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtTest 1.0
-import QtQml 2.2
-import Qt.labs.calendar 1.0
-
-TestCase {
- id: testCase
- name: "CalendarModel"
-
- Component {
- id: calendarModel
- CalendarModel { }
- }
-
- Component {
- id: instantiator
- Instantiator {
- model: CalendarModel {
- from: new Date(2016, 0, 1)
- to: new Date(2016, 11, 31)
- }
- QtObject {
- readonly property int month: model.month
- readonly property int year: model.year
- }
- }
- }
-
- function test_indices_data() {
- return [
- { tag: "2013", from: "2013-01-01", to: "2013-12-31", count: 12 },
- { tag: "2016", from: "2016-01-01", to: "2016-03-31", count: 3 }
- ]
- }
-
- function test_indices(data) {
- var model = calendarModel.createObject(testCase, {from: data.from, to: data.to})
- verify(model)
-
- compare(model.count, data.count)
-
- var y = parseInt(data.tag)
- for (var m = 0; m < 12; ++m) {
- compare(model.yearAt(m), y)
- compare(model.indexOf(y, m), m)
- compare(model.indexOf(new Date(y, m, 1)), m)
- compare(model.monthAt(m), m)
- }
-
- model.destroy()
- }
-
- function test_invalid() {
- var model = calendarModel.createObject(testCase)
- verify(model)
-
- compare(model.indexOf(-1, -1), -1)
- compare(model.indexOf(new Date(-1, -1, -1)), -1)
-
- model.destroy()
- }
-
- function test_instantiator() {
- var inst = instantiator.createObject(testCase)
- verify(inst)
-
- compare(inst.count, 12)
- for (var m = 0; m < inst.count; ++m) {
- compare(inst.objectAt(m).month, m)
- compare(inst.objectAt(m).year, 2016)
- }
-
- inst.destroy()
- }
-}
diff --git a/tests/auto/calendar/data/tst_dayofweekrow.qml b/tests/auto/calendar/data/tst_dayofweekrow.qml
deleted file mode 100644
index f6615f78..00000000
--- a/tests/auto/calendar/data/tst_dayofweekrow.qml
+++ /dev/null
@@ -1,95 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtTest 1.0
-import Qt.labs.calendar 1.0
-
-TestCase {
- id: testCase
- width: 400
- height: 400
- visible: true
- when: windowShown
- name: "DayOfWeekRow"
-
- Component {
- id: component
- DayOfWeekRow { }
- }
-
- function test_locale() {
- var control = component.createObject(testCase)
-
- verify(control.contentItem.children[0])
-
- control.locale = Qt.locale("en_US")
- compare(control.contentItem.children[0].text, "Sun")
-
- control.locale = Qt.locale("no_NO")
- compare(control.contentItem.children[0].text, "man.")
-
- control.locale = Qt.locale("fi_FI")
- compare(control.contentItem.children[0].text, "ma")
-
- control.destroy()
- }
-
- function test_font() {
- var control = component.createObject(testCase)
-
- verify(control.contentItem.children[0])
-
- control.font.pixelSize = 123
- compare(control.contentItem.children[0].font.pixelSize, 123)
-
- control.destroy()
- }
-}
diff --git a/tests/auto/calendar/data/tst_monthgrid.qml b/tests/auto/calendar/data/tst_monthgrid.qml
deleted file mode 100644
index 6d125712..00000000
--- a/tests/auto/calendar/data/tst_monthgrid.qml
+++ /dev/null
@@ -1,284 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtTest 1.0
-import Qt.labs.calendar 1.0
-
-TestCase {
- id: testCase
- width: 400
- height: 400
- visible: true
- when: windowShown
- name: "MonthGrid"
-
- Component {
- id: defaultGrid
- MonthGrid { }
- }
-
- Component {
- id: delegateGrid
- MonthGrid {
- delegate: Item {
- readonly property date date: model.date
- readonly property int day: model.day
- readonly property bool today: model.today
- readonly property int weekNumber: model.weekNumber
- readonly property int month: model.month
- readonly property int year: model.year
- }
- }
- }
-
- Component {
- id: signalSpy
- SignalSpy { }
- }
-
- function test_locale() {
- var control = delegateGrid.createObject(testCase, {month: 0, year: 2013})
-
- compare(control.contentItem.children.length, 6 * 7 + 1)
-
- // January 2013
- compare(control.month, 0)
- compare(control.year, 2013)
-
- // en_GB
- control.locale = Qt.locale("en_GB")
- compare(control.locale.name, "en_GB")
-
- // M T W T F S S
- var en_GB = ["2012-12-31", "2013-01-01", "2013-01-02", "2013-01-03", "2013-01-04", "2013-01-05", "2013-01-06",
- "2013-01-07", "2013-01-08", "2013-01-09", "2013-01-10", "2013-01-11", "2013-01-12", "2013-01-13",
- "2013-01-14", "2013-01-15", "2013-01-16", "2013-01-17", "2013-01-18", "2013-01-19", "2013-01-20",
- "2013-01-21", "2013-01-22", "2013-01-23", "2013-01-24", "2013-01-25", "2013-01-26", "2013-01-27",
- "2013-01-28", "2013-01-29", "2013-01-30", "2013-01-31", "2013-02-01", "2013-02-02", "2013-02-03",
- "2013-02-04", "2013-02-05", "2013-02-06", "2013-02-07", "2013-02-08", "2013-02-09", "2013-02-10"]
-
- for (var i = 0; i < 42; ++i) {
- var cellDate = new Date(en_GB[i])
- compare(control.contentItem.children[i].date.getFullYear(), cellDate.getUTCFullYear())
- compare(control.contentItem.children[i].date.getMonth(), cellDate.getUTCMonth())
- compare(control.contentItem.children[i].date.getDate(), cellDate.getUTCDate())
- compare(control.contentItem.children[i].day, cellDate.getUTCDate())
- compare(control.contentItem.children[i].today, cellDate === new Date())
- compare(control.contentItem.children[i].month, cellDate.getUTCMonth())
- compare(control.contentItem.children[i].year, cellDate.getUTCFullYear())
- }
-
- // en_US
- control.locale = Qt.locale("en_US")
- compare(control.locale.name, "en_US")
-
- // S M T W T F S
- var en_US = ["2012-12-30", "2012-12-31", "2013-01-01", "2013-01-02", "2013-01-03", "2013-01-04", "2013-01-05",
- "2013-01-06", "2013-01-07", "2013-01-08", "2013-01-09", "2013-01-10", "2013-01-11", "2013-01-12",
- "2013-01-13", "2013-01-14", "2013-01-15", "2013-01-16", "2013-01-17", "2013-01-18", "2013-01-19",
- "2013-01-20", "2013-01-21", "2013-01-22", "2013-01-23", "2013-01-24", "2013-01-25", "2013-01-26",
- "2013-01-27", "2013-01-28", "2013-01-29", "2013-01-30", "2013-01-31", "2013-02-01", "2013-02-02",
- "2013-02-03", "2013-02-04", "2013-02-05", "2013-02-06", "2013-02-07", "2013-02-08", "2013-02-09"]
-
- for (var j = 0; j < 42; ++j) {
- cellDate = new Date(en_US[j])
- compare(control.contentItem.children[j].date.getFullYear(), cellDate.getUTCFullYear())
- compare(control.contentItem.children[j].date.getMonth(), cellDate.getUTCMonth())
- compare(control.contentItem.children[j].date.getDate(), cellDate.getUTCDate())
- compare(control.contentItem.children[j].day, cellDate.getUTCDate())
- compare(control.contentItem.children[j].today, cellDate === new Date())
- compare(control.contentItem.children[j].month, cellDate.getUTCMonth())
- compare(control.contentItem.children[j].year, cellDate.getUTCFullYear())
- }
-
- control.destroy()
- }
-
- function test_range() {
- var control = defaultGrid.createObject(testCase)
-
- control.month = 0
- compare(control.month, 0)
-
-
- ignoreWarning(/tst_monthgrid.qml:65:9: QML (Abstract)?MonthGrid: month -1 is out of range \[0...11\]$/)
- control.month = -1
- compare(control.month, 0)
-
- control.month = 11
- compare(control.month, 11)
-
- ignoreWarning(/tst_monthgrid.qml:65:9: QML (Abstract)?MonthGrid: month 12 is out of range \[0...11\]$/)
- control.month = 12
- compare(control.month, 11)
-
- control.year = -271820
- compare(control.year, -271820)
-
- ignoreWarning(/tst_monthgrid.qml:65:9: QML (Abstract)?MonthGrid: year -271821 is out of range \[-271820...275759\]$/)
- control.year = -271821
- compare(control.year, -271820)
-
- control.year = 275759
- compare(control.year, 275759)
-
- ignoreWarning(/tst_monthgrid.qml:65:9: QML (Abstract)?MonthGrid: year 275760 is out of range \[-271820...275759\]$/)
- control.year = 275760
- compare(control.year, 275759)
-
- control.destroy()
- }
-
- function test_bce() {
- var control = defaultGrid.createObject(testCase)
-
- compare(control.contentItem.children.length, 6 * 7 + 1)
-
- // fi_FI
- control.locale = Qt.locale("fi_FI")
- compare(control.locale.name, "fi_FI")
-
- // January 1 BCE
- control.month = 0
- compare(control.month, 0)
- control.year = -1
- compare(control.year, -1)
-
- // M T W T F S S
- var jan1bce = [27, 28, 29, 30, 31, 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, 1, 2, 3, 4, 5, 6]
-
- for (var i = 0; i < 42; ++i)
- compare(control.contentItem.children[i].text, jan1bce[i].toString())
-
- // February 1 BCE
- control.month = 1
- compare(control.month, 1)
- control.year = -1
- compare(control.year, -1)
-
- // M T W T F S S
- var feb1bce = [31, 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, 1, 2, 3, 4, 5,
- 6, 7, 8, 9, 10, 11, 12]
-
- for (var j = 0; j < 42; ++j)
- compare(control.contentItem.children[j].text, feb1bce[j].toString())
-
- control.destroy()
- }
-
- function test_font() {
- var control = defaultGrid.createObject(testCase)
-
- verify(control.contentItem.children[0])
-
- control.font.pixelSize = 123
- compare(control.contentItem.children[0].font.pixelSize, 123)
-
- control.destroy()
- }
-
- function test_clicked_data() {
- return [
- { tag: "mouse", touch: false },
- { tag: "touch", touch: true }
- ]
- }
-
- function test_clicked(data) {
- var control = createTemporaryObject(defaultGrid, testCase)
- verify(control)
-
- compare(control.contentItem.children.length, 6 * 7 + 1)
-
- var pressedSpy = signalSpy.createObject(control, {target: control, signalName: "pressed"})
- verify(pressedSpy.valid)
-
- var releasedSpy = signalSpy.createObject(control, {target: control, signalName: "released"})
- verify(releasedSpy.valid)
-
- var clickedSpy = signalSpy.createObject(control, {target: control, signalName: "clicked"})
- verify(clickedSpy.valid)
-
- var touch = touchEvent(control)
-
- for (var i = 0; i < 42; ++i) {
- var cell = control.contentItem.children[i]
- verify(cell)
-
- if (data.touch)
- touch.press(0, cell).commit()
- else
- mousePress(cell)
-
- compare(pressedSpy.count, i + 1)
- compare(releasedSpy.count, i)
- compare(clickedSpy.count, i)
-
- if (data.touch)
- touch.release(0, cell).commit()
- else
- mouseRelease(cell)
-
- compare(pressedSpy.count, i + 1)
- compare(releasedSpy.count, i + 1)
- compare(clickedSpy.count, i + 1)
- }
- }
-}
diff --git a/tests/auto/calendar/data/tst_weeknumbercolumn.qml b/tests/auto/calendar/data/tst_weeknumbercolumn.qml
deleted file mode 100644
index d1b50339..00000000
--- a/tests/auto/calendar/data/tst_weeknumbercolumn.qml
+++ /dev/null
@@ -1,134 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:BSD$
-** 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.
-**
-** BSD License Usage
-** Alternatively, you may use this file under the terms of the BSD license
-** as follows:
-**
-** "Redistribution and use in source and binary forms, with or without
-** modification, are permitted provided that the following conditions are
-** met:
-** * Redistributions of source code must retain the above copyright
-** notice, this list of conditions and the following disclaimer.
-** * Redistributions in binary form must reproduce the above copyright
-** notice, this list of conditions and the following disclaimer in
-** the documentation and/or other materials provided with the
-** distribution.
-** * Neither the name of The Qt Company Ltd nor the names of its
-** contributors may be used to endorse or promote products derived
-** from this software without specific prior written permission.
-**
-**
-** THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-** "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-** LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-** A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
-** OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
-** SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
-** LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
-** DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
-** THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
-** (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
-** OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE."
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-import QtQuick 2.12
-import QtTest 1.0
-import Qt.labs.calendar 1.0
-
-TestCase {
- id: testCase
- width: 400
- height: 400
- visible: true
- when: windowShown
- name: "WeekNumberColumn"
-
- Component {
- id: component
- WeekNumberColumn { }
- }
-
- function test_locale() {
- var control = component.createObject(testCase)
-
- compare(control.contentItem.children.length, 6 + 1)
-
- control.month = 11
- control.year = 2015
-
- // en_US: [48...53]
- control.locale = Qt.locale("en_US")
- for (var i = 0; i < 6; ++i)
- compare(control.contentItem.children[i].text, (i + 48).toString())
-
- // no_NO: [49...1]
- control.locale = Qt.locale("no_NO")
- for (var j = 0; j < 5; ++j)
- compare(control.contentItem.children[j].text, (j + 49).toString())
- compare(control.contentItem.children[5].text, "1")
-
- control.destroy()
- }
-
- function test_range() {
- var control = component.createObject(testCase)
-
- control.month = 0
- compare(control.month, 0)
-
- ignoreWarning(/tst_weeknumbercolumn.qml:65:9: QML (Abstract)?WeekNumberColumn: month -1 is out of range \[0...11\]$/)
- control.month = -1
- compare(control.month, 0)
-
- control.month = 11
- compare(control.month, 11)
-
- ignoreWarning(/tst_weeknumbercolumn.qml:65:9: QML (Abstract)?WeekNumberColumn: month 12 is out of range \[0...11\]$/)
- control.month = 12
- compare(control.month, 11)
-
- control.year = -271820
- compare(control.year, -271820)
-
- ignoreWarning(/tst_weeknumbercolumn.qml:65:9: QML (Abstract)?WeekNumberColumn: year -271821 is out of range \[-271820...275759\]$/)
- control.year = -271821
- compare(control.year, -271820)
-
- control.year = 275759
- compare(control.year, 275759)
-
- ignoreWarning(/tst_weeknumbercolumn.qml:65:9: QML (Abstract)?WeekNumberColumn: year 275760 is out of range \[-271820...275759\]$/)
- control.year = 275760
- compare(control.year, 275759)
-
- control.destroy()
- }
-
- function test_font() {
- var control = component.createObject(testCase)
-
- verify(control.contentItem.children[0])
-
- control.font.pixelSize = 123
- compare(control.contentItem.children[0].font.pixelSize, 123)
-
- control.destroy()
- }
-}
diff --git a/tests/auto/calendar/tst_calendar.cpp b/tests/auto/calendar/tst_calendar.cpp
deleted file mode 100644
index 0194be62..00000000
--- a/tests/auto/calendar/tst_calendar.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-/****************************************************************************
-**
-** Copyright (C) 2017 The Qt Company Ltd.
-** Contact: http://www.qt.io/licensing/
-**
-** This file is part of the test suite of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:LGPL3$
-** 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 http://www.qt.io/terms-conditions. For further
-** information use the contact form at http://www.qt.io/contact-us.
-**
-** GNU Lesser General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU Lesser
-** General Public License version 3 as published by the Free Software
-** Foundation and appearing in the file LICENSE.LGPLv3 included in the
-** packaging of this file. Please review the following information to
-** ensure the GNU Lesser General Public License version 3 requirements
-** will be met: https://www.gnu.org/licenses/lgpl.html.
-**
-** GNU General Public License Usage
-** Alternatively, this file may be used under the terms of the GNU
-** General Public License version 2.0 or later as published by the Free
-** Software Foundation and appearing in the file LICENSE.GPL included in
-** the packaging of this file. Please review the following information to
-** ensure the GNU General Public License version 2.0 requirements will be
-** met: http://www.gnu.org/licenses/gpl-2.0.html.
-**
-** $QT_END_LICENSE$
-**
-****************************************************************************/
-
-#include <QtQuickTest/quicktest.h>
-QUICK_TEST_MAIN(tst_calendar)