+1 on both topics: product/team and the unit-module.
I, too, discovered the power of unit-testing and the unit-module lately. Using the unit-module I build unit-tests to test the basic rules, the axioms, of my modules and it works great. It is a big help in keeping the whole thing stable. One minor thing: it is not very fast, so I've to think well with what and how much I want to test, especially in case of generated test-cases. Which actually is a good thing in this case.
Rob
-----Oorspronkelijk bericht----- Van: basex-talk-bounces@mailman.uni-konstanz.de [mailto:basex-talk-bounces@mailman.uni-konstanz.de] Namens Marc van Grootel Verzonden: woensdag 13 januari 2016 10:08 Aan: Christian Grün CC: BaseX Onderwerp: Re: [basex-talk] Automatically generating test cases. Hidden feature?
The compliment is well-deserved ;-)
Yes, after my mind settled down on what I wrote, I realized this too. The annotation nor the anonymous function itself (a partial could have served the same function) wasn't necessary. So it's just plain cool instead of very cool.
It was mostly my sudden enthousiasm for the possibilities this approach opens for an alternative testing approach. I always thought about the unit module as having to write an explicit test suite with the unit annotations and never realized that the unit:assert functions can very well be used on their own. In my case in the context of generative/property-based testing.
Cheers, --Marc
On Wed, Jan 13, 2016 at 8:43 AM, Christian Grün christian.gruen@gmail.com wrote:
Hi Marc,
BaseX, the gift that keeps on giving, thanks to all that make it possible.
One of the nicest compliments that we got so far… Thanks ;)
So, a bit to my amazement, the following works:
let $equals := %unit:test function($a,$b) { unit:assert-equals($a,$b, 'Not equal') } return $equals(4,3)
Yes, it does, it will do so in the future. To add some more surprises: You can omit the %unit:test annotation, because it’s the unit:assert-equals function that raises the error in the XQUnit namespace.
Cheers, Christian
-- --Marc