Re: [racket-users] test amazes me

2015-05-25 Thread Vincent St-Amour
At Mon, 25 May 2015 08:03:22 +0200,
Jos Koot wrote:
>
> Now I am looking into rackunit and (planet schematics/schemeunit:3).

I believe the former is a descendant of the latter, so you're probably
better off sticking to Rackunit.

Vincent

-- 
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.
For more options, visit https://groups.google.com/d/optout.


RE: [racket-users] test amazes me

2015-05-24 Thread Jos Koot
Matthias and Alexander
Thanks for your responses.
As I wrote: it is not a big problem.
Now I am looking into rackunit and (
 planet
schematics/schemeunit:3).
Jos

  _  

From: Matthias Felleisen [mailto:matth...@ccs.neu.edu] 
Sent: lunes, 25 de mayo de 2015 3:37
To: Alexander D. Knauth
Cc: Jos Koot; Racket-Users List
Subject: Re: [racket-users] test amazes me



I didn't implement test-engine but worked with Kathy to design and
occasionally add features and/or maintain it. As you may know, in *SL the
test-engine library runs (test) automatically when a programmer runs a
program. That works out perfectly. I never imagined this library used for
plain racket (though I do, knowing of its shortcomings) and I conjecture
that Kathy factored the collection as an after-thought. So I wouldn't read
too much into this -- Matthias






On May 24, 2015, at 9:06 PM, Alexander D. Knauth wrote:


Look at what this does:
#lang racket
(require test-engine/racket-tests)
(check-expect 1 1)
(check-expect 2 2)
(check-expect 3 3)
(check-expect (displayln "hello") (displayln "world"))
(test)
(test)
Welcome to DrRacket, version 6.2.0.3--2015-05-17(542b960/a) [3m].
Language: racket [custom]; memory limit: 8182 MB.
world
hello
All 4 tests passed!
world
hello
All 8 tests passed!
> 

The test expressions are each evaluated twice, and each test passes a second
time.

I imagine this could be considered useful if for instance the tests depended
on a mutable value and that value was mutated in between the runs of test,
but was that the intention? I don't know.

Also it appears to evaluate the second expression first and the first
expression second. Weird.


On May 24, 2015, at 6:42 PM, Jos Koot  wrote:


#lang racket
 
(module a racket
 (require test-engine/racket-tests)
 (check-expect 1 1)
 (test))
 
(module b racket
 (require test-engine/racket-tests)
 (check-expect 2 2)
 (test))
 
(require 'a 'b)
 
This gives me:
 
Welcome to DrRacket, version 6.2.900.3--2015-05-16(e8b52f6/a) [3m].
Language: racket [custom]; memory limit: 2000 MB.
The only test passed!
All 3 tests passed!
 
Apparently test does not clear the list of tests already done.
But even then I am surprised by seeing THREE tests passed.
Without clearing the accumulated tests, I would expect:
All TWO tests passed!
 
Should test not eliminate the tests already done from the list of tests to
be gathered in future?
And how come (require 'a 'b) does THREE tests, not TWO?
 
Is is not a big problem. I am just curious.
Thanks,
Jos
 
 
 
 
 
 

-- 
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.
For more options, visit https://groups.google.com/d/optout.




-- 
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.
For more options, visit https://groups.google.com/d/optout.



-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] test amazes me

2015-05-24 Thread Matthias Felleisen

I didn't implement test-engine but worked with Kathy to design and occasionally 
add features and/or maintain it. As you may know, in *SL the test-engine 
library runs (test) automatically when a programmer runs a program. That works 
out perfectly. I never imagined this library used for plain racket (though I 
do, knowing of its shortcomings) and I conjecture that Kathy factored the 
collection as an after-thought. So I wouldn't read too much into this -- 
Matthias






On May 24, 2015, at 9:06 PM, Alexander D. Knauth wrote:

> Look at what this does:
> #lang racket
> (require test-engine/racket-tests)
> (check-expect 1 1)
> (check-expect 2 2)
> (check-expect 3 3)
> (check-expect (displayln "hello") (displayln "world"))
> (test)
> (test)
> Welcome to DrRacket, version 6.2.0.3--2015-05-17(542b960/a) [3m].
> Language: racket [custom]; memory limit: 8182 MB.
> world
> hello
> All 4 tests passed!
> world
> hello
> All 8 tests passed!
> > 
> 
> The test expressions are each evaluated twice, and each test passes a second 
> time.
> 
> I imagine this could be considered useful if for instance the tests depended 
> on a mutable value and that value was mutated in between the runs of test, 
> but was that the intention? I don’t know.
> 
> Also it appears to evaluate the second expression first and the first 
> expression second. Weird.
> 
> 
> On May 24, 2015, at 6:42 PM, Jos Koot  wrote:
> 
>> #lang racket
>>  
>> (module a racket
>>  (require test-engine/racket-tests)
>>  (check-expect 1 1)
>>  (test))
>>  
>> (module b racket
>>  (require test-engine/racket-tests)
>>  (check-expect 2 2)
>>  (test))
>>  
>> (require 'a 'b)
>>  
>> This gives me:
>>  
>> Welcome to DrRacket, version 6.2.900.3--2015-05-16(e8b52f6/a) [3m].
>> Language: racket [custom]; memory limit: 2000 MB.
>> The only test passed!
>> All 3 tests passed!
>>  
>> Apparently test does not clear the list of tests already done.
>> But even then I am surprised by seeing THREE tests passed.
>> Without clearing the accumulated tests, I would expect:
>> All TWO tests passed!
>>  
>> Should test not eliminate the tests already done from the list of tests to 
>> be gathered in future?
>> And how come (require 'a 'b) does THREE tests, not TWO?
>>  
>> Is is not a big problem. I am just curious.
>> Thanks,
>> Jos
>>  
>>  
>>  
>>  
>>  
>>  
>> 
>> -- 
>> 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.
>> For more options, visit https://groups.google.com/d/optout.
> 
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [racket-users] test amazes me

2015-05-24 Thread Alexander D. Knauth
Look at what this does:
#lang racket
(require test-engine/racket-tests)
(check-expect 1 1)
(check-expect 2 2)
(check-expect 3 3)
(check-expect (displayln "hello") (displayln "world"))
(test)
(test)
Welcome to DrRacket, version 6.2.0.3--2015-05-17(542b960/a) [3m].
Language: racket [custom]; memory limit: 8182 MB.
world
hello
All 4 tests passed!
world
hello
All 8 tests passed!
> 

The test expressions are each evaluated twice, and each test passes a second 
time.

I imagine this could be considered useful if for instance the tests depended on 
a mutable value and that value was mutated in between the runs of test, but was 
that the intention? I don’t know.

Also it appears to evaluate the second expression first and the first 
expression second. Weird.


On May 24, 2015, at 6:42 PM, Jos Koot  wrote:

> #lang racket
>  
> (module a racket
>  (require test-engine/racket-tests)
>  (check-expect 1 1)
>  (test))
>  
> (module b racket
>  (require test-engine/racket-tests)
>  (check-expect 2 2)
>  (test))
>  
> (require 'a 'b)
>  
> This gives me:
>  
> Welcome to DrRacket, version 6.2.900.3--2015-05-16(e8b52f6/a) [3m].
> Language: racket [custom]; memory limit: 2000 MB.
> The only test passed!
> All 3 tests passed!
>  
> Apparently test does not clear the list of tests already done.
> But even then I am surprised by seeing THREE tests passed.
> Without clearing the accumulated tests, I would expect:
> All TWO tests passed!
>  
> Should test not eliminate the tests already done from the list of tests to be 
> gathered in future?
> And how come (require 'a 'b) does THREE tests, not TWO?
>  
> Is is not a big problem. I am just curious.
> Thanks,
> Jos
>  
>  
>  
>  
>  
>  
> 
> -- 
> 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.
> For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.