From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: sirgazil Newsgroups: gmane.lisp.guile.user Subject: SRFI 64: How do I create a test-runner stub Date: Thu, 7 Mar 2019 16:02:37 -0500 Message-ID: <0048113f-e621-7047-8438-2dde5a54c08f@zoho.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="258968"; mail-complaints-to="usenet@blaine.gmane.org" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 To: Guile User Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Mar 07 22:03:31 2019 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1h20At-0015HM-Lq for guile-user@m.gmane.org; Thu, 07 Mar 2019 22:03:31 +0100 Original-Received: from localhost ([127.0.0.1]:59483 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h20As-0004AE-Ji for guile-user@m.gmane.org; Thu, 07 Mar 2019 16:03:30 -0500 Original-Received: from eggs.gnu.org ([209.51.188.92]:39113) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h20AK-000498-QV for guile-user@gnu.org; Thu, 07 Mar 2019 16:02:57 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h20AJ-0001JK-VI for guile-user@gnu.org; Thu, 07 Mar 2019 16:02:56 -0500 Original-Received: from sender-pp-091.zoho.com ([135.84.80.236]:25098) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1h20AJ-0001FX-KM for guile-user@gnu.org; Thu, 07 Mar 2019 16:02:55 -0500 ARC-Seal: i=1; a=rsa-sha256; t=1551992563; cv=none; d=zoho.com; s=zohoarc; b=SLVy2H0VvyBXpklv8qYDOMdb0G4XgYMtLW0APhtCnc9ph/PgVuFg5uX23lD2s6UA+nbnG0H8Gc2EvJSrG6wpdVLYssusTQW4JhRAHNBZlHpaSRUBU5i0wH4Kzpgt0aPNt+aDJ+xJetXgshOL3u8NfYi5niBW1dY+TcayqoQpzSE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1551992563; h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To:ARC-Authentication-Results; bh=rAQJUYoBapPB0E/MjWbWudpNcwlySVmi3tYXnJOu7rs=; b=auH0gEFRil/lbCEE6VcT5rN2x2x0tqiEJ8VapalIGa0AITTfAbZf4iJzIHrbjd7gm/Dh0ovv/w9ggi/n/4BNz1GAt3stEbnyO9aCM2K/9WjZA83cD6Jdv5YOGK6JD/aD8mwp06iZ+KS6JrSjBoRAceKGoe0NWRPypWnpajT/yT8= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=sirgazil@zoho.com; dmarc=pass header.from= header.from= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=to:from:message-id:subject:date:user-agent:mime-version:content-type; b=fJj/le77YSs51qhKdSJwMMq7CKCj0YUVdZoWc0iFTHkOX1oP2dQJD6nQGxUEt11tw3GNVx8hSzYb zDVeLhAXkGmYIgFpU6GfGPkmTWjmVZ5wvNTM8zDxa0fjWadOPAD7 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1551992563; s=default; d=zoho.com; i=sirgazil@zoho.com; h=To:From:Message-ID:Subject:Date:MIME-Version:Content-Type:Content-Transfer-Encoding; l=1114; bh=rAQJUYoBapPB0E/MjWbWudpNcwlySVmi3tYXnJOu7rs=; b=WC17NEk5Qd2sOQupHs+XbQOcGCBHfs1Z8W3gge8YCWT98jk+HznmkEAviiERAZQs NHodlmtneFjVawg7P/95o6UgXn7W+EsuQg9NYthJOESUo8s/0BGjMG706+mfIkARlF0 2EhRZd6aa/TaeAzGnIgIo3kbnsLlUgK8740OchF8= Original-Received: from [192.168.1.57] (181.130.25.222 [181.130.25.222]) by mx.zohomail.com with SMTPS id 155199255948758.06500261220265; Thu, 7 Mar 2019 13:02:39 -0800 (PST) Content-Language: en-US X-ZohoMailClient: External X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 135.84.80.236 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.org gmane.lisp.guile.user:15360 Archived-At: Hello, I'm trying to implement a procedure that takes a test-runner object and=20 returns a string with information about the most recently run test. For=20 example, calling (format-test-result (make-runner #:test-name "A is not B."=20 #:result-kind 'fail)) is expected to return: =E2=9C=96 FAIL A is not B. In the example, `make-runner` is a procedure that is supposed to create=20 a test-runner stub with the given values, so that I can test the=20 `format-test-result` procedure. I thought I could define `make-runner` body like this: (let ((runner-stub (test-runner-null))) (test-runner-test-name! runner-stub test-name) (test-result-set! runner-stub 'result-kind result-kind) stub-runner)) The problem is, the `test-runner-test-name!` setter does not exist. And=20 test-runner objects don't seem to have a `test-name` slot. They do=20 provide a `test-runner-test-name` getter, though. So I don't know how to create a test-runner stub to test my procedure. What would you do in this case? --=20 Luis Felipe L=C3=B3pez Acevedo http://sirgazil.bitbucket.io/