On 7/11/06, Gaal Yahas <[EMAIL PROTECTED]> wrote:
On Mon, Jul 10, 2006 at 03:55:25PM -0700, Darren Duncan wrote: > I believe that the current Test.pm already qualifies as a baby-Perl > implementation, as overall its functionality is quite simple, and it > uses very little of the language (especially since its use of > junctions was removed a few weeks ago).Test.pm currently uses the following non-trivial language features: - implicitly, the ability to load a module - function export - function named args - parameter default values - &caller - $?CALLER::CALLER::POSITION - &sub.goto - %*ENV - END {...}
great list. we're currently working towards these points in the parrot/perl6 implementation.
Some of these can be given up on in a prospective Test::Simple, if only because they in themselves shouldn't be the first things an implementation should strive to provide for their own sake.
i hesitate to call a test module that uses a limited language '::Simple,' as this word has been traditionally used for modules which ease usability, not those that make the language implementor's job easier. perhaps 'Test::Perl6::Sanity' might better describe testing the sanity of a perl6 implementation... *ahem* really hard not to make a snide remark here *cough*.
> Have a look at 01-sanity again. Since I moved 08-test out of that > folder (and into 02-test-pm) none of those 01-sanity tests use > Test.pm at all. > > My impression of 01-sanity is that it checks that the Perl 6 > implementation has the basic language functions that Test.pm has as a > prerequisite, such as being able to print, knowing basic > conditionals, supporting basic subroutines and modules. > > If 01-sanity runs, then the normal Test.pm should be useable, and > 02-test-pm checks that Test.pm itself actually works. When that > runs, then the other tests can be performed as usual. Some things are missing in 01-sanity/ if the particular implementation of our current Test.pm is the par for tests there.
i'd love to see tests refactored to make 01-sanity/ the first wicket (to use a croquet analogy) for testing a perl6 implementation.
Clearly more tests should be added, but we can permit fledgling implementations to use their own worse-is-better Test modules. So these tests should perhaps go into 02-test-pm/, not 01-sanity/.
agreed. then higher-level constructs can be used in the *real* Test.pm. in my opinion, Test.pm should be idiomatic perl6, as its audience is well beyond we the foolish few perl6 implementors.
> I would say for starters that anything which is written in Perl 6 > will be shared by all implementations, and that includes Test.pm. > > Considering its few needs, any Perl that can't run the current > Test.pm is hardly useful, so they would be getting up to the level of > supporting Test.pm very quickly. And in the process of getting to > that level, the 01-sanity tests can be tried without Test.pm. (Responded to above.)
i'd like to note that in order to get to the 01-sanity/ tests, we (parrot/perl6 implementors) needed some tests of more basic building blocks. for these tests, we created 00-parrot/. here we test literals, math/logic/comparison ops, variable assignment/interpolation, inplace math/string ops, and regex smartmatching. i suppose now i should call this the 0th wicket. (that's what i hate about analogies--now i've limited the audience who understands this one from *all croquet players* to *all cs-geek croquet players*.) i'm staked out. tea anyone? ~jerry
