mirror of
https://gitlab.linphone.org/BC/public/linphone-desktop.git
synced 2026-01-23 06:38:07 +00:00
feat(Notifications/Notification): add spec file
This commit is contained in:
parent
91bb74c218
commit
fbfa00a3de
3 changed files with 38 additions and 1 deletions
|
|
@ -112,7 +112,7 @@ void Notifier::showCallMessage (
|
|||
);
|
||||
|
||||
// Destroy it after timeout.
|
||||
QTimer::singleShot(timeout, this, [object,this]() {
|
||||
QTimer::singleShot(timeout, this, [object, this]() {
|
||||
delete object;
|
||||
|
||||
m_mutex.lock();
|
||||
|
|
|
|||
|
|
@ -0,0 +1,25 @@
|
|||
import QtTest 1.1
|
||||
|
||||
import Linphone 1.0
|
||||
import Utils 1.0
|
||||
|
||||
// ===================================================================
|
||||
|
||||
// Check defined properties/methods used in `Notifier.cpp`.
|
||||
TestCase {
|
||||
Notification {
|
||||
id: notification
|
||||
}
|
||||
|
||||
function test_notificationHeightProperty () {
|
||||
compare(Utils.isInteger(notification.notificationHeight), true)
|
||||
}
|
||||
|
||||
function test_notificationOffsetProperty () {
|
||||
compare(Utils.isInteger(notification.notificationOffset), true)
|
||||
}
|
||||
|
||||
function test_notificationShowMethod () {
|
||||
compare(Utils.isFunction(notification.show), true)
|
||||
}
|
||||
}
|
||||
|
|
@ -365,6 +365,18 @@ function isArray (array) {
|
|||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
function isFunction (func) {
|
||||
return typeof func === 'function'
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
function isInteger (integer) {
|
||||
return integer === parseInt(integer, 10)
|
||||
}
|
||||
|
||||
// -------------------------------------------------------------------
|
||||
|
||||
function isString (string) {
|
||||
return typeof string === 'string' || string instanceof String
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue