Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message From: Moritz Lenz mor...@faui2k3.org So Larry and Patrick developed the idea of creating an adverb on the test operator instead: $x == 1e5 :ok('the :ok makes this is a test'); This is an adverb on the infix:== operator, and might desugar to something

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-22 Thread Dave Whipp
Darren Duncan wrote: Dave Whipp wrote: sub sqrt(Num where { 0 = $_ = Real::Max } $x) { (0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 } } So do you really mean as declarative a manner as possible? Or would you consider this example to go beyond possible? I would declare

Re: RFD: Built-in testing

2009-01-22 Thread Dave Whipp
Moritz Lenz wrote: A few months ago Larry proposed to add some testing facilites to the language itself, because we want to culturally encourage testing, and because the test suite defines the language, so we need to specify the behaviour of our testing facilities anyway. If we're going to

Re: RFD: Built-in testing

2009-01-22 Thread Dave Whipp
Moritz Lenz wrote: $x == 1e5 :ok('the :ok makes this is a test'); I can't help feeling that there's an end-weight problem here: The fact that it is a test is the essence of statement. If we're thinking of it as a library, then the MMD way of thinking might be appropriate: we know

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message From: Moritz Lenz mor...@faui2k3.org test Unit::Customer plan 3 { use Customer; my Customer $cust .= new( :fname, :lname); $cust.fname eq 'Billy' :ok; # plan assumes 2 referrals # won't work because we can't interpolate?

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
Ovid wrote: Regarding the disadvantages: However nothing in life is free, we pay for it with a few disadvantages: * We nearly double the number of built-in operators by adding an :ok multi Yes, but conceptually this will be transparent to the end user, right? They'll just know that

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
There are a few interesting points on which I'd like to comment Richard Hainsworth wrote: In other words, test functionality sufficient for the compiler may not be adequate for module testing. But other functions can be developed in Test modules that can be hooked into a general testing

Re: RFD: Built-in testing

2009-01-22 Thread Moritz Lenz
Ovid wrote: One concern is where Larry asks: I wonder how often we'd have people making the error of trying to interpoalte into :okbad $x pardner I'd be one of them. The following is a very common idiom: for my $method (@methods) { can_ok $object, $method;

Re: design of the Prelude (was Re: Rakudo leaving the Parrot nest)

2009-01-22 Thread Darren Duncan
Dave Whipp wrote: Darren Duncan wrote: Dave Whipp wrote: sub sqrt(Num where { 0 = $_ = Real::Max } $x) { (0..$x/2 :by(Real::Epsilon)).min: { abs $x - $^candidate ** 2 } } So do you really mean as declarative a manner as possible? Or would you consider this example to go beyond possible?

Re: RFD: Built-in testing

2009-01-22 Thread jerry gay
On Thu, Jan 22, 2009 at 09:22, Moritz Lenz mor...@faui2k3.org wrote: Richard Hainsworth wrote: But it is interesting to think about the case where a user wants two different diagnostic test messages (to all the testing gurus out there: do you actually want such a feature?). It shouldn't be too

Re: RFD: Built-in testing

2009-01-22 Thread Ovid
- Original Message From: jerry gay jerry@gmail.com On Thu, Jan 22, 2009 at 09:22, Moritz Lenz wrote: Richard Hainsworth wrote: But it is interesting to think about the case where a user wants two different diagnostic test messages (to all the testing gurus out there: do

Re: RFD: Built-in testing

2009-01-22 Thread jason switzer
On Thu, Jan 22, 2009 at 4:51 PM, jerry gay jerry@gmail.com wrote: $x == $y :ok({ .true ?? 'message' !! 'failure message' }) :diag( 'tap comment', :some_tap_propertysome values) I just want to stress again that I would like to see no focus on just tap emitters. While I realize this

Re: RFD: Built-in testing

2009-01-22 Thread Timothy S. Nelson
On Thu, 22 Jan 2009, Richard Hainsworth wrote: 4) Testing software is different from debugging or running software. Running is about providing functionality to the user. Debugging is about getting expected behaviour and discovering why behaviour exhibited is not what is expected / specified.

Re: RFD: Built-in testing

2009-01-22 Thread Timothy S. Nelson
On Wed, 21 Jan 2009, Dave Whipp wrote: Moritz Lenz wrote: A few months ago Larry proposed to add some testing facilites to the language itself, because we want to culturally encourage testing, and because the test suite defines the language, so we need to specify the behaviour of our testing

perl6 Testing

2009-01-22 Thread fREW Schmidt
Hi! I'd like to get started adding these: is capitalize(:string($a)), Pugs Is Cool!, capitalize works with named arg rakudo and pugs both fail this test. Should I add it anyway? And should I just mail patches to rakudo...@perl.org? Or should this technically be pugs? -- -fREW

Re: perl6 Testing

2009-01-22 Thread Moritz Lenz
fREW Schmidt wrote: I'd like to get started adding these: is capitalize(:string($a)), Pugs Is Cool!, capitalize works with named arg rakudo and pugs both fail this test. Should I add it anyway? Yes. We have a mechanism for skipping tests that the implementations fail. Just write it like