Index: denali.pro =================================================================== diff -u -r8f6f7c11390e3ed6d918f1717d8e8b7ae5b7e5c6 -r17cf10c16cb68ff285fd2fec452f26cc41af76d8 --- denali.pro (.../denali.pro) (revision 8f6f7c11390e3ed6d918f1717d8e8b7ae5b7e5c6) +++ denali.pro (.../denali.pro) (revision 17cf10c16cb68ff285fd2fec452f26cc41af76d8) @@ -197,6 +197,15 @@ unittests/tst_acknow.cpp } +tst_slider { + message(Building with Quick Test test case slider) + CONFIG += warn_on qmltestcase + QT += testlib + DEFINES += QUICK_UNIT_TEST \ + TEST_CLASS_NAME=tst_slider +} + + # Additional import path used to resolve QML modules in Qt Creator's code model QML_IMPORT_PATH = @@ -207,3 +216,5 @@ qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target + +DISTFILES += Index: denali.pro.user =================================================================== diff -u -r1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829 -r17cf10c16cb68ff285fd2fec452f26cc41af76d8 --- denali.pro.user (.../denali.pro.user) (revision 1b060ccba8bfccf34d6a7a5ddd6d94eb6d149829) +++ denali.pro.user (.../denali.pro.user) (revision 17cf10c16cb68ff285fd2fec452f26cc41af76d8) @@ -1,6 +1,6 @@ - + EnvironmentId @@ -72,23 +72,19 @@ 0 0 + true + 2 /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Debug + /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Debug true - qmake - QtProjectManager.QMakeBuildStep - true false - false - false true - Make - Qt4ProjectManager.MakeStep false @@ -98,14 +94,12 @@ 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -115,36 +109,32 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Debug Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Release + /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Release true - qmake - QtProjectManager.QMakeBuildStep - false false - false - true true - Make - Qt4ProjectManager.MakeStep false @@ -154,14 +144,12 @@ 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -171,36 +159,32 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Release Release Qt4ProjectManager.Qt4BuildConfiguration 0 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Profile + /home/denali/Project/tmp/build/denali-Qt_5_12_5_iMX8-Profile true - qmake - QtProjectManager.QMakeBuildStep - true false - true - true true - Make - Qt4ProjectManager.MakeStep false @@ -210,14 +194,12 @@ 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -227,25 +209,23 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Profile Profile Qt4ProjectManager.Qt4BuildConfiguration 0 - true + 2 + 2 3 true - Check for free disk space - RemoteLinux.CheckForFreeDiskSpaceStep @@ -258,8 +238,6 @@ true - Kill current application instance - RemoteLinux.KillAppStep @@ -270,8 +248,6 @@ true - Deploy files via rsync - RemoteLinux.RsyncDeployStep @@ -284,12 +260,12 @@ 3 Deploy - + Deploy ProjectExplorer.BuildSteps.Deploy 1 - Deploy to Remote Linux Host - + + false DeployToGenericLinux 1 @@ -301,6 +277,14 @@ 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + -F true 4096 @@ -346,14 +330,15 @@ 1 - denali (on Generic Linux Device (iMX8)) RemoteLinuxRunConfiguration:/home/denali/Project/application/denali.pro + /home/denali/Project/application/denali.pro 1 false - - 3768 + -u -0 + false + false true false @@ -377,23 +362,19 @@ 0 0 + true + 2 /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug + /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug true - qmake - QtProjectManager.QMakeBuildStep - true false - false - false true - Make - Qt4ProjectManager.MakeStep false @@ -403,14 +384,12 @@ 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -420,36 +399,32 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Debug Debug Qt4ProjectManager.Qt4BuildConfiguration 2 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release + /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Release true - qmake - QtProjectManager.QMakeBuildStep - false false - false - true true - Make - Qt4ProjectManager.MakeStep false @@ -459,14 +434,12 @@ 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -476,36 +449,32 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Release Release Qt4ProjectManager.Qt4BuildConfiguration 0 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Profile + /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Profile true - qmake - QtProjectManager.QMakeBuildStep - true false - true - true true - Make - Qt4ProjectManager.MakeStep false @@ -515,14 +484,12 @@ 2 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -532,36 +499,32 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false - Profile Profile Qt4ProjectManager.Qt4BuildConfiguration 0 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/unittest/tst_canbus + /home/denali/Project/tmp/build/unittest/tst_canbus true - qmake - QtProjectManager.QMakeBuildStep - true CONFIG+=tst_canbus CONFIG+=CodeCoverage false - true - true true - Make - Qt4ProjectManager.MakeStep false @@ -574,47 +537,37 @@ %{buildDir}/denali %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep 6 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -624,38 +577,34 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin - Test tst_canbus Qt4ProjectManager.Qt4BuildConfiguration 2 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/unittest/tst_logging + /home/denali/Project/tmp/build/unittest/tst_logging true - qmake - QtProjectManager.QMakeBuildStep - true CONFIG+=tst_logging CONFIG+=CodeCoverage false - true - true true - Make - Qt4ProjectManager.MakeStep false @@ -668,47 +617,37 @@ %{buildDir}/denali %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep 6 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -718,38 +657,34 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin - Test tst_logging Qt4ProjectManager.Qt4BuildConfiguration 2 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/unittest/tst_utilities + /home/denali/Project/tmp/build/unittest/tst_utilities true - qmake - QtProjectManager.QMakeBuildStep - true CONFIG+=tst_utilities CONFIG+=CodeCoverage false - true - true true - Make - Qt4ProjectManager.MakeStep false @@ -762,47 +697,37 @@ %{buildDir}/denali %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep 6 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -812,38 +737,34 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin - Test tst_utilities Qt4ProjectManager.Qt4BuildConfiguration 2 - true + 2 + 2 + true + 2 /home/denali/Project/tmp/build/unittest/tst_acknow + /home/denali/Project/tmp/build/unittest/tst_acknow true - qmake - QtProjectManager.QMakeBuildStep - true CONFIG+=tst_acknow CONFIG+=CodeCoverage false - true - true true - Make - Qt4ProjectManager.MakeStep false @@ -856,47 +777,37 @@ %{buildDir}/denali %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true -m denali.csmes -t UnitTests denali.csexe cmcsexeimport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --html=Coverage/index cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep true --csmes=denali.csmes --csv-excel=Coverage/coverage.csv cmreport %{buildDir} - Custom Process Step - ProjectExplorer.ProcessStep 6 Build - + Build ProjectExplorer.BuildSteps.Build true - Make - Qt4ProjectManager.MakeStep true @@ -906,31 +817,81 @@ 1 Clean - + Clean ProjectExplorer.BuildSteps.Clean 2 false PATH=/opt/SquishCoco/bin:/opt/SquishCoco/wrapper/bin:/opt/Qt5.12.5/5.12.5/gcc_64/bin:/usr/bin:/home/denali/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin - Test tst_acknow Qt4ProjectManager.Qt4BuildConfiguration 2 - true + 2 + 2 - 7 + + true + 2 + /home/denali/Project/tmp/build/tst_slider + /home/denali/Project/tmp/build/tst_slider + + + true + QtProjectManager.QMakeBuildStep + CONFIG+=tst_slider + false + + + true + Qt4ProjectManager.MakeStep + + false + + + false + + 2 + Build + Build + ProjectExplorer.BuildSteps.Build + + + + true + Qt4ProjectManager.MakeStep + + true + clean + + false + + 1 + Clean + Clean + ProjectExplorer.BuildSteps.Clean + + 2 + false + + tst_slider + Qt4ProjectManager.Qt4BuildConfiguration + 2 + 2 + 2 + + 8 0 Deploy - + Deploy ProjectExplorer.BuildSteps.Deploy 1 - Deploy Configuration - + + false ProjectExplorer.DefaultDeployConfiguration 1 @@ -942,6 +903,14 @@ 250 + + -e + cpu-cycles + --call-graph + dwarf,4096 + -F + 250 + -F true 4096 @@ -987,19 +956,19 @@ 2 - denali - Qt4ProjectManager.Qt4RunConfiguration:/home/denali/Project/application/denali.pro + /home/denali/Project/application/denali.pro - 3768 + false + false true true false - true - false + false + true - + /home/denali/Project/tmp/build/denali-Desktop_Qt_5_12_5_GCC_64bit-Debug 1 Index: denali.qrc =================================================================== diff -u -rf148379112a69d1c52027f2667e95f3f96d948ad -r17cf10c16cb68ff285fd2fec452f26cc41af76d8 --- denali.qrc (.../denali.qrc) (revision f148379112a69d1c52027f2667e95f3f96d948ad) +++ denali.qrc (.../denali.qrc) (revision 17cf10c16cb68ff285fd2fec452f26cc41af76d8) @@ -54,6 +54,9 @@ qtquickcontrols2.conf sources/gui/qml/main.qml + + sources/gui/testcases/tst_slider.qml + sources/gui/qml/globals/Variables.qml Index: main.cpp =================================================================== diff -u -rf18edfae2d733f22291f26e789acaeb7f46f109a -r17cf10c16cb68ff285fd2fec452f26cc41af76d8 --- main.cpp (.../main.cpp) (revision f18edfae2d733f22291f26e789acaeb7f46f109a) +++ main.cpp (.../main.cpp) (revision 17cf10c16cb68ff285fd2fec452f26cc41af76d8) @@ -175,7 +175,12 @@ #ifdef UNIT_TEST #include TEST_CLASS_INCLUDE QTEST_MAIN(TEST_CLASS_NAME) +#elif QUICK_UNIT_TEST + #include + //Gui::startGui(); + QUICK_TEST_MAIN(slider) #else + /*! \brief Application Initialization\n * Some part of the application need to be initialized out of any thread. * So is initialized here to be initialized in the main thread. Index: sources/gui/testcases/tst_slider.qml =================================================================== diff -u --- sources/gui/testcases/tst_slider.qml (revision 0) +++ sources/gui/testcases/tst_slider.qml (revision 17cf10c16cb68ff285fd2fec452f26cc41af76d8) @@ -0,0 +1,45 @@ +import QtQuick 2.0 +import QtTest 1.2 + +import "qrc:/globals" +import "qrc:/components" +//import "/home/denali/Project/application/sources/gui/qml/globals" +//import "/home/denali/Project/application/sources/gui/qml/components" + + +TestCase { + name: "Slider Test" + Slider { id: _slider + width: 200 + height: 10 + minimum: 10 + maximum: 20 + value: 0 + visible: true + } + + function test_min() { + _slider.value = 10 + verify(_slider.value == 11) + } + + function test_max() { + _slider.value = 20 + verify(_slider.value == 20) + } + + function test_min_less() { + _slider.value = 5 + verify(_slider.value == _slider.minimum) + } + + function test_max_more() { + _slider.value = 25 + verify(_slider.value == _slider.maximum) + } + function test_click_max() { + mouseClick(_slider, 199,5) + console.debug(_slider.value) + } + +}