From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.ciao.gmane.io!not-for-mail From: Vladimir Zhbanov Newsgroups: gmane.lisp.guile.user Subject: Re: SRFI-64: test exception symbol Date: Thu, 30 Apr 2020 18:55:09 +0300 Message-ID: <20200430155509.GB16174@newvzh.lokolhoz> References: <20200430150621.GA16174@newvzh.lokolhoz> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="ciao.gmane.io:159.69.161.202"; logging-data="114334"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Mutt/1.10.1 (2018-07-13) To: guile-user@gnu.org Original-X-From: guile-user-bounces+guile-user=m.gmane-mx.org@gnu.org Thu Apr 30 18:10:14 2020 Return-path: Envelope-to: guile-user@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1jUBlO-000Tca-Ed for guile-user@m.gmane-mx.org; Thu, 30 Apr 2020 18:10:14 +0200 Original-Received: from localhost ([::1]:53276 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUBlN-00066V-AB for guile-user@m.gmane-mx.org; Thu, 30 Apr 2020 12:10:13 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44956) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jUBY9-0001ED-1D for guile-user@gnu.org; Thu, 30 Apr 2020 12:00:34 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jUBWu-0006YN-Dm for guile-user@gnu.org; Thu, 30 Apr 2020 11:56:32 -0400 Original-Received: from mail-lj1-x22c.google.com ([2a00:1450:4864:20::22c]:41218) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jUBWt-0006Xn-MO for guile-user@gnu.org; Thu, 30 Apr 2020 11:55:15 -0400 Original-Received: by mail-lj1-x22c.google.com with SMTP id j3so7022668ljg.8 for ; Thu, 30 Apr 2020 08:55:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=EE4OMl2K20uAN5WdN2sHcXRQr3dZ4VYc6dKCsRuMc7Y=; b=FhMvI4ViSzF9aoDfFD/CKQ14Aa4JpCZ3uXCPtw+CzKElhp2kPM0pWafRrhV7rLKhk7 qz/p9jqeW8IAO0bva3TZcRNw+8JaRSlRrDcd/JClRZ2WE86pDsYA4WZZuMBQciW1LFmB VZPh5TM9V7pjHPkUuXVY9MFu6Go1F8YzGIlS3HAAlfTcWzZm4j347IYZxp9sJnT0eu4u +/YWX1U1PUDt72GKh+spz18KZIetZDBcr0tu2i+MjBhOu09j8o7Zf0HmvtvojN+yCNQW VWsfFNpoezwkMKdg34n1XL4zT/EGMIkNx9TmwYJIdGLIi85BG1bRtQJA6xQO6SpavW77 Jf7Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:subject:message-id:mail-followup-to :references:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=EE4OMl2K20uAN5WdN2sHcXRQr3dZ4VYc6dKCsRuMc7Y=; b=N9pGlWTzHqCfMJJbJFXxWs7V8JdG8oQME8u/fhlqoIKcyBDx12g/6XgpF04dviKm59 /2AfJCPaOKWN7Fb7AL9yJEx7LGtDZ3EXHHJn/7aYeaXM91JxScKsIqHSGviuLxbC+ai8 cXSPFeEmNCk3YoaHwrPQWpriD08+kOW8K6+J3rfmtLmUcqu1lE13tmcZc9gaje4wt3yp onntauCVgcJ1q5H9SLB1ebtFpYx+YJ8iLnSuamlIrixHWfPDmdUnT3pJwUydhX6KoM16 CyEVEd1XmfkDZBdKgJuCjtOGk/WLYwSzypUce0Qy+k2DQCU0hy/PUhAgh/DboCCldEwC Aesw== X-Gm-Message-State: AGi0PuYGVLQB5f65dj4T2XN4bfpe/qrFd+b1wT6f+t9ZUgvWe2dBiT8B peUzek1Rr1Wq1e8cgFeoxniWXuL/ X-Google-Smtp-Source: APiQypLPIQK7k2NxGAVf4xwAjfzk0e0RyQHiveLkzYtqjMXoo3Br3lsiQRnbXleIBozSAoO3h892sA== X-Received: by 2002:a2e:a58e:: with SMTP id m14mr2625242ljp.95.1588262113011; Thu, 30 Apr 2020 08:55:13 -0700 (PDT) Original-Received: from newvzh.lokolhoz ([95.179.127.152]) by smtp.gmail.com with ESMTPSA id j22sm26057lfg.96.2020.04.30.08.55.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Apr 2020 08:55:11 -0700 (PDT) Original-Received: from vovka by newvzh.lokolhoz with local (Exim 4.92) (envelope-from ) id 1jUBWn-0002F1-En for guile-user@gnu.org; Thu, 30 Apr 2020 18:55:09 +0300 Mail-Followup-To: guile-user@gnu.org Content-Disposition: inline In-Reply-To: <20200430150621.GA16174@newvzh.lokolhoz> Received-SPF: pass client-ip=2a00:1450:4864:20::22c; envelope-from=vzhbanov@gmail.com; helo=mail-lj1-x22c.google.com X-detected-operating-system: by eggs.gnu.org: Error: [-] PROGRAM ABORT : Malformed IPv6 address (bad octet value). Location : parse_addr6(), p0f-client.c:67 X-Received-From: 2a00:1450:4864:20::22c X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.23 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-mx.org@gnu.org Original-Sender: "guile-user" Xref: news.gmane.io gmane.lisp.guile.user:16410 Archived-At: On Thu, Apr 30, 2020 at 06:06:21PM +0300, Vladimir Zhbanov wrote: > Hi, > > In SRFI-64, is there a way to test what exception raised using > test-error() or anything else? I know about looking into test > logs (if 'test-error' is used), though that's not what I need. I > need a way to be sure a test raises the exception it should raise. To clarify things a little: in our project (in one of a dozen test-suites :)) we already have a function that does checking of what I'm asking about: (define (%assert-thrown key thunk) (catch key (lambda () (thunk) (throw 'test-failed-exception (simple-format #f " assert-thrown: expected exception: ~S" key))) (lambda (key . args) #t))) Is there something like this in SRFI-64? -- Vladimir (λ)επτόν EDA — https://github.com/lepton-eda