check out the main submodule.
On Sat, Dec 21, 2013 at 10:47 PM, Manfred Lotz wrote:
> Hi there,
> In a small program I like to have the test cases in the same file. How
> can I prevent the 'main' function of my program to be run when I do a
> raco test?
>
>
> Here is a minimal example:
>
> #lang
Hi there,
In a small program I like to have the test cases in the same file. How
can I prevent the 'main' function of my program to be run when I do a
raco test?
Here is a minimal example:
#lang racket
(define (myfun)
(displayln "hey"))
(myfun)
(module+ test
(require rackunit)
(
You've got yourself a tricky problem, here.
The accepted way to compare how close two vectors or matrices are is to
compute the norm of their difference - basically, the distance between
them. The functions `matrix-absolute-error' and `matrix-relative-error'
in `math/matrix' do that, and handl
To loop back on this:
I updated the info.rkt for all my packages.
I also submitted PRs or requests for a couple packages I depend on,
which were missing this. Because one consequence of this idea...
> So: In my .travis.yml files I already run `raco pkg install`. What I
> think I will do is also
That looks very useful.
On Sat, Dec 21, 2013 at 6:23 PM, Greg Hendershott wrote:
> > check-= wants single value but unfortunately my values are wrapped in
> set of vectors.
>
> Oh I didn't notice that.
>
> In that case you could define your own check -- that looks inside the
> sets and vectors
> check-= wants single value but unfortunately my values are wrapped in set of
> vectors.
Oh I didn't notice that.
In that case you could define your own check -- that looks inside the
sets and vectors to do the approximate equality test -- using the
second variant of `define-binary-check` as de
check-= wants single value but unfortunately my values are wrapped in set
of vectors.
On Sat, Dec 21, 2013 at 5:04 PM, Greg Hendershott wrote:
> On Sat, Dec 21, 2013 at 3:42 PM, J G Cho wrote:
> > FAILURE
> > actual: # > #(0.7071067811865476 -0.7071067811865476)>
> > expected: # > #(0.
On Sat, Dec 21, 2013 at 3:42 PM, J G Cho wrote:
> FAILURE
> actual: # #(0.7071067811865476 -0.7071067811865476)>
> expected: # #(0.7071067811865475 -0.7071067811865475)>
>
> Is there something like "check-close-enough?" in rackunit?
I think you want check-=
http://docs.racket-lang.org/rack
I have a test that fails.
(module+ test
(check-equal? (list->set
(vector-2d-orthogonals (vector 1 1)))
(list->set
(list
(vector-unit
(vector -1 1))
9 matches
Mail list logo