initial import
Fri Apr 3 00:18:27 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* initial import
diff -rN -u old-kde.tests/kde.tests.mbd new-kde.tests/kde.tests.mbd
--- old-kde.tests/kde.tests.mbd 1970-01-01 01:00:00.000000000 +0100
+++ new-kde.tests/kde.tests.mbd 2014-10-30 06:57:17.000000000 +0100
@@ -0,0 +1,37 @@
+;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
+;;; Copyright 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
+;;;
+;;; Permission is hereby granted, free of charge, to any person
+;;; obtaining a copy of this software and associated documentation
+;;; files (the "Software"), to deal in the Software without
+;;; restriction, including without limitation the rights to use,
+;;; copy, modify, merge, publish, distribute, sublicense, and/or sell
+;;; copies of the Software, and to permit persons to whom the
+;;; Software is furnished to do so, subject to the following
+;;; conditions:
+;;;
+;;; The above copyright notice and this permission notice shall be
+;;; included in all copies or substantial portions of the Software.
+;;;
+;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+;;; OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+;;; FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+;;; OTHER DEALINGS IN THE SOFTWARE.
+;;;
+
+(in-package :sysdef-user)
+
+(define-system :kde.tests ()
+ (:version 0 0 1)
+ (:documentation "KDE unit tests.")
+ (:author "Tobias Rautenkranz")
+ (:needs :kde :FiveAM :qt.test)
+ (:components
+ ("src" module
+ (:components "package"
+ ("tests" (:needs "package"))
+ ("click" (:needs "tests"))))))
diff -rN -u old-kde.tests/src/click.lisp new-kde.tests/src/click.lisp
--- old-kde.tests/src/click.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-kde.tests/src/click.lisp 2014-10-30 06:57:17.000000000 +0100
@@ -0,0 +1,22 @@
+(in-package :kde.tests)
+
+(5am:in-suite :kde.suite)
+
+(defclass my-widget (kde:push-button)
+ ()
+ (:metaclass smoke::smoke-wrapper-class))
+
+(5am:test click-test
+ "Test clicking a button."
+ (kde::with-kde ("hello" "hello-world" "0.0.1")
+ (let ((widget (make-instance 'my-widget))
+ (click-count 0))
+ (qt:connect-function widget "clicked()"
+ #'(lambda ()
+ (incf click-count)))
+
+ (cxx:set-text widget "Click Me")
+
+ (5am:is (= 0 click-count))
+ (qt.test:test.mouse-click widget qt:+left-button+)
+ (5am:is (= 1 click-count)))))
diff -rN -u old-kde.tests/src/package.lisp new-kde.tests/src/package.lisp
--- old-kde.tests/src/package.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-kde.tests/src/package.lisp 2014-10-30 06:57:17.000000000 +0100
@@ -0,0 +1,3 @@
+(defpackage :kde.tests
+ (:use :cl :asdf)
+ (:export :run))
diff -rN -u old-kde.tests/src/tests.lisp new-kde.tests/src/tests.lisp
--- old-kde.tests/src/tests.lisp 1970-01-01 01:00:00.000000000 +0100
+++ new-kde.tests/src/tests.lisp 2014-10-30 06:57:17.000000000 +0100
@@ -0,0 +1,10 @@
+(in-package :kde.tests)
+
+(5am:def-suite :kde.suite)
+
+(5am:in-suite :kde.suite)
+
+(defun run ()
+ (let ((results (5am:run :kde.suite)))
+ (5am:explain! results)
+ (5am:results-status results)))