r4740: *** empty log message ***
[umlisp.git] / tests.lisp
1 ;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: umlisp -*-
2 ;;;; *************************************************************************
3 ;;;; FILE IDENTIFICATION
4 ;;;;
5 ;;;; Name:          tests.lisp
6 ;;;; Purpose:       Regression suite for UMLisp
7 ;;;; Author:        Kevin M. Rosenberg
8 ;;;; Date Started:  May 2003
9 ;;;;
10 ;;;; $Id: tests.lisp,v 1.1 2003/05/02 18:47:53 kevin Exp $
11 ;;;;
12 ;;;; This file, part of UMLisp, is
13 ;;;;    Copyright (c) 2000-2002 by Kevin M. Rosenberg, M.D.
14 ;;;;
15 ;;;; UMLisp users are granted the rights to distribute and use this software
16 ;;;; as governed by the terms of the GNU General Public License.
17 ;;;; *************************************************************************
18
19 (defpackage #:umlisp-tests
20   (:use #:umlisp #:cl #:rtest))
21 (in-package #:umlisp-tests)
22
23 (setf rtest::*catch-errors* nil)
24
25 (rem-all-tests)
26
27 (deftest qs.1 (umlisp::query-string 'mrcon '(cui lui))
28   "select CUI,LUI from MRCON")
29
30 (deftest qs.2 (umlisp::query-string 'mrcon '(cui lui) 0)
31   "select CUI,LUI from MRCON and KCUILRL <= 0")
32
33 (deftest qs.3 (umlisp::query-string 'mrcon '(cui lui) nil 'cui 5)
34   "select CUI,LUI from MRCON where CUI=5")
35
36 (deftest qs.4 (umlisp::query-string 'mrcon '(cui lui) nil 'kpfstr "Abc")
37   "select CUI,LUI from MRCON where KPFSTR='Abc'")
38
39 (deftest qs.5 (umlisp::query-string 'mrcon '(cui lui) 2 'cui 5 "limit 1")
40   "select CUI,LUI from MRCON where CUI=5 and KCUILRL <= 2 limit 1")
41
42 (deftest qs.6 (umlisp::query-string 'mrdef '(sab def) 2 'cui 39 'srl "limit 1")
43   "select SAB,DEF from MRDEF where CUI=39 and KSRL <= 2 limit 1")
44
45
46
47