[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: test-equal: actual returned value is #f when tested expression raise
From: |
Jérémy Korwin-Zmijowski |
Subject: |
Re: test-equal: actual returned value is #f when tested expression raises execption |
Date: |
Sat, 20 Feb 2021 13:09:30 +0100 |
User-agent: |
K-9 Mail for Android |
Hi Divoplade,
Thank you for your explanation. I might not have put enough emphase on my issue.
When you said:
"However,
since now there's a char-sets.scm, it can use the module and find the
function, and everything works correctly."
My concern here is that I did not defined the procedure in the module. It's
empty.
Jérémy
Le 20 février 2021 12:26:46 GMT+01:00, divoplade <d@divoplade.fr> a écrit :
>Hello,
>
>This is what I understand from guile. I am no expert, so maybe it is
>not 100% accurate!
>
>Le samedi 20 février 2021 à 12:03 +0100, Jérémy Korwin-Zmijowski a
>écrit :
>>
>> Running `guile -L . char-sets-test.scm` in the file location will
>> produce the following output :
>>
>> $ guile -L . char-sets-test.scm
>> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
>> ;;; or pass the --no-auto-compile argument to disable.
>> ;;; compiling /tmp/char-sets-test.scm
>> ;;; WARNING: compilation of /tmp/char-sets-test.scm failed:
>> ;;; no code for module (char-sets)
>
>From now on, char-sets-test.scm has been compiled, but guile did not
>find password-valid?, so it assumed that this function will be
>available at run time when needed. Maybe some crazy macro expansion,
>who knows?
>>
>> And now, I rerun the tests :
>>
>> $ guile -L . char-sets-test.scm
>> ;;; note: auto-compilation is enabled, set GUILE_AUTO_COMPILE=0
>> ;;; or pass the --no-auto-compile argument to disable.
>> ;;; compiling /tmp/char-sets-test.scm
>> ;;; compiling ./char-sets.scm
>> ;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-4.4/tmp/char-
>> sets.scm.go
>> ;;; char-sets-test.scm:10:2: warning: possibly unbound variable
>> `password-valid?'
>> ;;; compiled /home/jeko/.cache/guile/ccache/3.0-LE-8-4.4/tmp/char-
>> sets-
>> test.scm.go
>> %%%% Starting test harness-char-sets (Writing full log to "harness-
>> char-sets.log")
>> # of expected passes 1
>
>Guile did not re-compile the test, because the code did not change, but
>remembered from last time that password-valid? was potentially missing,
>so it issues the warning again when loading the bytecode. However,
>since now there's a char-sets.scm, it can use the module and find the
>function, and everything works correctly.
>
>Everything works because guile does not inline code from a module to
>another. So the warning is just a warning. You don't need to worry.
>
--
Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma
brièveté.