octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Test code in .oct sources


From: Daniel Kraft
Subject: Test code in .oct sources
Date: Mon, 15 Jul 2013 10:44:44 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130620 Thunderbird/17.0.7

Hi,

I just tried to include test code in the sources to an .oct function of
mine, and at first Octave didn't find them.  A look at test.m showed
that it only looks for sources in .cc files, while I use .cpp as
extension for C++ files.  (As I get it, .C and .cxx are also used.)

What do you think about extending the range of supported file
extensions?  I don't think this could lead to any problems, because the
only case when it differs from the current situation would be if someone
types "test foo", doesn't have foo.m or foo.cc, but has foo.cpp.  And in
this case, I presume it is valid to assume that the he/she actually
*wanted* to get the test code from foo.cpp.

While at it, one could even rewrite the corresponding lines in test.m
with a loop over a cell-array of supported file extensions.

Does this sound like a good idea?  If yes, I will provide a patch for it.

Yours,
Daniel

-- 
http://www.domob.eu/
--
Done:  Arc-Bar-Cav-Hea-Kni-Ran-Rog-Sam-Tou-Val-Wiz
To go: Mon-Pri


reply via email to

[Prev in Thread] Current Thread [Next in Thread]