On Oct 21, 2008, at 2:27 AM, Brice Figureau wrote: >> >> At the least, each snippet should have an empty test, since otherwise >> the snippet is totally ignored. With an empty test, the snippet is >> at >> least syntax-checked. > > The snippets are also used in lexer test, so snippets using a "new" > token don't absolutely need a snippet test. But you're right, I've > added > snippets tests to the code that wasn't yet checked in in 0.24.x. If I > have time, I'll review my older submissions to see if I can add more > snippets test.
Ah, you're right -- I forgot that the lexer uses the snippets, too. > >> I'm not exactly thrilled with those tests, esp. since they all >> require >> transactions and everything -- it'd be much better to test the >> resulting catalog. > > Yes. I think so. > Not really related, but maybe you could offer me a good advice, is > that > the main issue I have with rspec parser test is how to test that the > produced ast tree is correct in case of complex expression. I can > "expect" the various new method called, but I'd like to make sure the > returned structure matches what the parser tree should be. It's always going to be a bit hard to test that a given syntax tree is created, because recursive structures are pretty annoying to validate. It is possible to directly validate the generated tree, it's just a bit messy. -- It is a very sad thing that nowadays there is so little useless information. -- Oscar Wilde --------------------------------------------------------------------- Luke Kanies | http://reductivelabs.com | http://madstop.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Puppet Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en -~----------~----~----~----~------~----~------~--~---
