klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 449d627ad216d5de2a0a1f9d27e0904d84d0ea0a
parent 26a5af8f634925620b409b06188774f68057c0ea
Author: Oto Havle <havleoto@gmail.com>
Date:   Sat, 10 Dec 2011 14:26:48 +0100

Bugfix: vector equality

Diffstat:
Msrc/kghelpers.c | 2+-
Msrc/tests/strings.k | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/kghelpers.c b/src/kghelpers.c @@ -1012,7 +1012,7 @@ bool equal2p(klisp_State *K, TValue obj1, TValue obj2) if (!equal_find2_mergep(K, obj1, obj2)) { uint32_t i = kvector_size(obj1); TValue *array1 = kvector_buf(obj1); - TValue *array2 = kvector_buf(obj1); + TValue *array2 = kvector_buf(obj2); while(i-- > 0) { ks_spush(K, array1[i]); ks_spush(K, array2[i]); diff --git a/src/tests/strings.k b/src/tests/strings.k @@ -229,7 +229,8 @@ ;; XXX string->vector ($check equal? (string->vector "") (vector)) -($check equal? (string->vector "abc") (vector #\a #\B #\c)) +($check equal? (string->vector "abc") (vector #\a #\b #\c)) +($check-not-predicate (equal? (string->vector "abc") (vector #\a #\B #\c))) ($check-not-predicate ($let*