From e056ac5d58e44a76a4185c37fce6948044b83c66 Mon Sep 17 00:00:00 2001 From: El-BG-1970 Date: Sat, 27 Aug 2022 17:36:05 +0200 Subject: smart redisplay for panel and zone-prices panes --- tests/test-inventory.lisp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tests/test-inventory.lisp') diff --git a/tests/test-inventory.lisp b/tests/test-inventory.lisp index ab732f5..61bfd19 100644 --- a/tests/test-inventory.lisp +++ b/tests/test-inventory.lisp @@ -20,7 +20,7 @@ (test inventory-init-values (let ((i (inventory:new-inventory 100))) (is (= (inventory::size i) 100)) - (is (= (inventory:filled i) 0)) + (is (= (car (inventory:how-filled i)) 0)) (is (eq (inventory::items i) nil)))) ;; test add and substract @@ -30,18 +30,18 @@ (c2 (commodities:new-commodity "apple" 99))) ;; add 10 (is (= (inventory:add-item i c 10) 10)) - (is (= (inventory:filled i) 10)) + (is (= (car (inventory:how-filled i)) 10)) ;; remove 4 (is (equal (inventory:remove-item i "apple" 4) (cons c 4))) - (is (= (inventory:filled i) 6)) + (is (= (car (inventory:how-filled i)) 6)) (is (equal (inventory::find-item i "apple") (cons c 6))) ;; adding 90 (is (= (inventory:add-item i c 90) 96)) ;; adding one too many (is (not (inventory:add-item i c 5))) - (is (= (inventory::filled i) 96)) + (is (= (car (inventory:how-filled i)) 96)) (is (and (commodities:commodity-eq c -- cgit v1.2.3