On Wed, Sep 15, 2010 at 6:44 AM, Andy Buckle <andybuc...@gmail.com> wrote: > On Tue, Sep 14, 2010 at 10:22 PM, Pascal Dupuis > <pascal.dup...@worldonline.be> wrote: >> Le 14/09/10 17:41, Søren Hauberg a écrit : >>> tir, 14 09 2010 kl. 17:24 +0200, skrev depuis: >>> Thanks for looking into this. I am, however, not sure this is the right >>> approach. Is it not possible to embed the tests directly in the C++ >>> file? This is done in core Octave in many places, but I am unsure about >>> which internal mechanisms are used when the tests are actually begin >>> executed. >>> >>> Søren >> Hello, >> this test is only performed at the package installation stage, so I see >> no advantage in converting it in C++. If you look at its content, you'll >> notice that the code is not as uniform as it seems, as the dimensions of >> the matrices returned by gsvd depends on the input matrices rank. You >> have thus to be very carefull when performing matrices multiplications. >> Hence I fear that C++ translation would be very tedious, for a >> single-use test. >> >> Regards >> >> Pascal >> > > You put m-script test code in the comments of your c++ file in a > certain format. then you test with "test foo.cc" or whatever. I was > trying to find an example c++ file with this in, but I ran out of > time.
I can't remember where I first saw this, but attached is a c++ source file of my own. Note the test and demo sections at the end. -- /* andy buckle */
gamma2d_triangle_oct.cpp
Description: Binary data
------------------------------------------------------------------------------ Start uncovering the many advantages of virtual appliances and start using them to simplify application deployment and accelerate your shift to cloud computing. http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________ Octave-dev mailing list Octave-dev@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/octave-dev