Grant Rettke | 26 Nov 2011 03:56
Picon
Favicon
Gravatar

Confusing module enter behavior

Hi,

Today I wanted to try out the develop-test style flow using enter and
found these results which were not what I expected:

1.	Create foo.rkt. Define method foo which returns 1
2.	Create foo-test.rkt. Add test for foo which should return 0
3.     In foo-test, C:c, C:a; test fails as expected
4. 	In foo, change result to 0
5.	In foo-test, C:c, C:a; test passes as expected
6.     In foo, change result to 1
7.	In foo-test, C:c, C:a; test passes, which is not expected.
	The reason is that I can see in the repl that
	[re-loading c:\dev\tmp\enter\foo.rkt]
	occurs; as the docs for enter! explain.
	Evaluating (foo) in the repl also returns one, so the test
	should have failed. Even C:x,C:e on the (foo) in the test
	returns one.

What is odd is that I can see the new definition gets loaded, but
something still isn't right.

Emacs 23.3.1, Geiser 0.1.3, Windows XP, and Racket 5.2.h

;;; foo.rkt
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
#lang racket

(provide (all-defined-out))

(Continue reading)

Jose A. Ortega Ruiz | 26 Nov 2011 04:21
Picon
Gravatar

Re: Confusing module enter behavior


Hi Grant,

On Sat, Nov 26 2011, Grant Rettke wrote:

> Hi,
>
> Today I wanted to try out the develop-test style flow using enter and
> found these results which were not what I expected:
>
> 1.	Create foo.rkt. Define method foo which returns 1
> 2.	Create foo-test.rkt. Add test for foo which should return 0
> 3.     In foo-test, C:c, C:a; test fails as expected
> 4. 	In foo, change result to 0
> 5.	In foo-test, C:c, C:a; test passes as expected
> 6.     In foo, change result to 1
> 7.	In foo-test, C:c, C:a; test passes, which is not expected.

I think the test is not passing.  You can check that by entering it
manually in the REPL.  The problem is that geiser is not capturing the
output of check-eq? and displaying it as it should.  So yes, this is a
bug :)  I'll ping you back in the list as soon as i fix it...

Thanks for your patience!
jao
--

-- 
We have, I fear, confused power with greatness.
 -Stewart I. Udall, politician (1920-2010)

(Continue reading)

Jose A. Ortega Ruiz | 26 Nov 2011 07:14
Picon
Gravatar

Re: Confusing module enter behavior


Hi again,

I've just pushed a patch to the git repo(s) that should fix the problem,
in case you feel like trying the unstable version :)

Cheers,
jao
--

-- 
A language that doesn't affect the way you think about programming, is
not worth knowing.
  - Alan Perlis, Epigrams in Programing


Gmane