Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: ac49465281
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.672 kb
;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; indent-tabs-mode: nil -*-
;;;;
;;;; Copyright © 2009 Josh Marchan, Adlai Chandrasekhar
;;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(in-package :chanl)
(def-suite queues :in chanl)
(in-suite queues)
(test queue
(let ((queue (make-queue 2)))
(is (queue-empty-p queue))
(is (eq 5 (enqueue 5 queue)))
(is (not (queue-empty-p queue)))
(is (= 1 (queue-count queue)))
(is (eq 10 (enqueue 10 queue)))
(is (= 2 (queue-count queue)))
(is (= 5 (queue-peek queue)))
(is (= 5 (dequeue queue)))
(is (= 10 (dequeue queue)))))
Jump to Line
Something went wrong with that request. Please try again.