[racket-users] Re: foldts-test-suite

2020-06-03 Thread Jack Firth
Nope. A well-designed replacement for those APIs is sorely needed.

On Tuesday, June 2, 2020 at 6:37:17 PM UTC-7, Alex Harsanyi wrote:
>
>
> Are there alternatives to the `folds-test-suite` and `fold-test-results` 
> functions, for people who want to write their own test running and 
> reporting for Rackunit tests?
>
> Alex.
>
> On Wednesday, June 3, 2020 at 2:00:02 AM UTC+8, Jack Firth wrote:
>>
>> The test case folding stuff in RackUnit should mostly be ignored, instead 
>> of extended.
>>
>> On Saturday, May 23, 2020 at 7:52:21 AM UTC-7, Shriram Krishnamurthi 
>> wrote:
>>>
>>> The documentation
>>>
>>>
>>> https://docs.racket-lang.org/rackunit/internals.html?q=run-test-case#%28def._%28%28lib._rackunit%2Fmain..rkt%29._foldts-test-suite%29%29
>>>
>>> says that `folds-test-suite` can be implemented in terms of 
>>> `fold-test-results` as follows:
>>>
>>> (define 
>>> 
>>>  (fold-test-results 
>>> 
>>>  suite-fn case-fn seed test)
>>>   (foldts-test-suite 
>>> 
>>>(lambda 
>>> 
>>>  (suite name before 
>>> 
>>>  after 
>>> 
>>>  seed)
>>>  (before 
>>> 
>>> )
>>>  (suite-fn name seed))
>>>(lambda 
>>> 
>>>  (suite name before 
>>> 
>>>  after 
>>> 
>>>  seed kid-seed)
>>>  (after 
>>> 
>>> )
>>>  kid-seed)
>>>(lambda 
>>> 
>>>  (case 
>>> 
>>>  name action seed)
>>>  (case-fn
>>>(run-test-case 
>>> 
>>>  name action)
>>>seed))
>>>seed
>>>test))
>>>
>>> I'm curious why the value of `seed` in the second argument (the fup 
>>> position) — highlighted — is ignored. I was guessing that, since this is a 
>>> tree-fold, there are values "from across" and "from down", and we don't 
>>> want to throw either one away. Wouldn't we want to take a combinator that 
>>> combines the two?
>>>
>>> Shriram
>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/8902b15a-d3e7-4e27-8d65-4ba4dc7243bc%40googlegroups.com.


[racket-users] Re: foldts-test-suite

2020-06-02 Thread Alex Harsanyi

Are there alternatives to the `folds-test-suite` and `fold-test-results` 
functions, for people who want to write their own test running and 
reporting for Rackunit tests?

Alex.

On Wednesday, June 3, 2020 at 2:00:02 AM UTC+8, Jack Firth wrote:
>
> The test case folding stuff in RackUnit should mostly be ignored, instead 
> of extended.
>
> On Saturday, May 23, 2020 at 7:52:21 AM UTC-7, Shriram Krishnamurthi wrote:
>>
>> The documentation
>>
>>
>> https://docs.racket-lang.org/rackunit/internals.html?q=run-test-case#%28def._%28%28lib._rackunit%2Fmain..rkt%29._foldts-test-suite%29%29
>>
>> says that `folds-test-suite` can be implemented in terms of 
>> `fold-test-results` as follows:
>>
>> (define 
>> 
>>  (fold-test-results 
>> 
>>  suite-fn case-fn seed test)
>>   (foldts-test-suite 
>> 
>>(lambda 
>> 
>>  (suite name before 
>> 
>>  after 
>> 
>>  seed)
>>  (before 
>> 
>> )
>>  (suite-fn name seed))
>>(lambda 
>> 
>>  (suite name before 
>> 
>>  after 
>> 
>>  seed kid-seed)
>>  (after 
>> 
>> )
>>  kid-seed)
>>(lambda 
>> 
>>  (case 
>> 
>>  name action seed)
>>  (case-fn
>>(run-test-case 
>> 
>>  name action)
>>seed))
>>seed
>>test))
>>
>> I'm curious why the value of `seed` in the second argument (the fup 
>> position) — highlighted — is ignored. I was guessing that, since this is a 
>> tree-fold, there are values "from across" and "from down", and we don't 
>> want to throw either one away. Wouldn't we want to take a combinator that 
>> combines the two?
>>
>> Shriram
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/3f5561cc-c91e-4cc3-aa90-6fc37e3f028c%40googlegroups.com.


[racket-users] Re: foldts-test-suite

2020-06-02 Thread Jack Firth
The test case folding stuff in RackUnit should mostly be ignored, instead 
of extended.

On Saturday, May 23, 2020 at 7:52:21 AM UTC-7, Shriram Krishnamurthi wrote:
>
> The documentation
>
>
> https://docs.racket-lang.org/rackunit/internals.html?q=run-test-case#%28def._%28%28lib._rackunit%2Fmain..rkt%29._foldts-test-suite%29%29
>
> says that `folds-test-suite` can be implemented in terms of 
> `fold-test-results` as follows:
>
> (define 
> 
>  (fold-test-results 
> 
>  suite-fn case-fn seed test)
>   (foldts-test-suite 
> 
>(lambda 
> 
>  (suite name before 
> 
>  after 
> 
>  seed)
>  (before 
> 
> )
>  (suite-fn name seed))
>(lambda 
> 
>  (suite name before 
> 
>  after 
> 
>  seed kid-seed)
>  (after 
> 
> )
>  kid-seed)
>(lambda 
> 
>  (case 
> 
>  name action seed)
>  (case-fn
>(run-test-case 
> 
>  name action)
>seed))
>seed
>test))
>
> I'm curious why the value of `seed` in the second argument (the fup 
> position) — highlighted — is ignored. I was guessing that, since this is a 
> tree-fold, there are values "from across" and "from down", and we don't 
> want to throw either one away. Wouldn't we want to take a combinator that 
> combines the two?
>
> Shriram
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/racket-users/7e7fd2ef-92bd-4719-a199-2556295bd2b6%40googlegroups.com.