package-test.lisp @ aacf9ee4fddc

Port some of the '99 Prolog Problems' to Bones as unit tests

Also fixes a bug that they uncovered.
author Steve Losh <steve@stevelosh.com>
date Sun, 17 Jul 2016 00:50:25 +0000
parents 5c914fbcb042
children 4abb7eda96cb
(defpackage #:bones-test
  (:use #:cl #:1am))

(defpackage #:bones-test.utils
  (:use
    #:cl
    #:1am
    #:bones.wam
    #:bones.quickutils)
  (:export
    #:fail
    #:empty
    #:result=
    #:results=
    #:should-fail
    #:should-return))

(defpackage #:bones-test.paip
  (:use
    #:cl
    #:1am
    #:bones.quickutils
    #:bones.paip))

(defpackage #:bones-test.wam
  (:use
    #:cl
    #:1am
    #:bones-test.utils
    #:bones.quickutils
    #:bones.wam)
  (:import-from #:bones.wam
    #:with-database
    #:make-database
    #:with-fresh-database
    #:push-logic-frame-with
    #:rule
    #:fact
    #:facts
    #:call
    #:dump-wam-full
    #:?
    #:!
    #:query
    #:query-all)
  (:import-from #:bones.utils
    #:symbolize))

(defpackage #:bones-test.99
  (:use
    #:cl
    #:1am
    #:bones-test.utils
    #:bones.quickutils
    #:bones.wam)
  (:import-from #:bones.wam
    #:with-fresh-database
    #:push-logic-frame-with
    #:rule
    #:fact
    #:facts
    #:call
    #:dump-wam-full
    #:?
    #:!
    #:query
    #:query-all)
  (:import-from #:bones.utils
    #:symbolize))

(defpackage #:bones-test.circle
  (:use
    #:cl
    #:1am
    #:bones.circle))