From e1da69922aa0869e136c91def848b8fc028f3a39 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Mon, 25 Jul 2022 20:54:17 -0700 Subject: Re-write the linker. --- csc/linker-test.csc | 59 ++++++++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 49 insertions(+), 10 deletions(-) (limited to 'csc/linker-test.csc') diff --git a/csc/linker-test.csc b/csc/linker-test.csc index 084e9ae..cc07a74 100644 --- a/csc/linker-test.csc +++ b/csc/linker-test.csc @@ -1,24 +1,63 @@ (import (scheme base) - (only (csc encoding) encode) + (only (csc format) + sprintf) + (only (csc hash-map) + alist->map + hash-bytevector + make-comparer + make-map) + (only (csc list) + all) (only (csc testing) assert-equal test) (csc linker)) -(test link-if +(define compare-globals + (make-comparer + (lambda (x) + (hash-bytevector (string->utf8 (sprintf "{}" x)))) + (lambda (x y) + (cond + ((equal? x y) 0) + ((stringmap compare-globals '(((global cons (csc based)) . 10)))))) -- cgit v1.3.1