I just looked at test.py, it seems like a good way to go for building a csd/opcode tester. Oeyvind 2008/5/31, Steven Yi : > Hi Oeyvind, > > Currently there is not a really formal practice, but I think for new > opcodes the expectation is that it include documentation and an > example CSD, both packaged with the manual project. We could build a > test runner or just modify test.py from csound5/test/test.py to do a > search of all CSD's in a directory and run it in the examples folder > of the manual. This would test for errors where csound would crash, > but not where csound runs correctly and the opcode code is wrong. > > Anyone think we should formalize a test suite? > steven > > On Sat, May 31, 2008 at 3:53 AM, Oeyvind Brandtsegg wrote: > > Is there a common practice for writing test csd files for opcodes ? > > And a method of running all tests, returning the number of tests and > > the number of successes/failures ? > > > > best > > Oeyvind > > > > 2008/5/31, Steven Yi : > >> It's not of major consequence to me either way and I can see it being > >> a good thing if we promote adding test CSD files anytime someone > >> commits new opcodes. Perhaps we should either create sub-directories > >> for tests or rename the test to not be numbered so as to be easy to > >> differentiate between the compiler test suite and general tests? > >> > >> Thanks! > >> steven > >> > >> On Fri, May 30, 2008 at 3:19 PM, Michael Gogins wrote: > >> > Do you want me to move or remove the test? > >> > > >> > Mike > >> > > >> > ----- Original Message ----- From: "Steven Yi" > >> > To: > >> > Sent: Friday, May 30, 2008 5:28 PM > >> > Subject: [Csnd] Re: Re: Indexing vectors and colon notation? > >> > > >> > > >> >> Hi Michael, > >> >> > >> >> Just to note, the tests in the tests folder were originally put there > >> >> as part of a suite of tests for the new compiler. So test1.csd > >> >> through test23.csd each progressively add a language feature or type, > >> >> and the description of the test is in the test runner test.py file in > >> >> that directory. > >> >> > >> >> steven > >> >> > >> >> On Fri, May 30, 2008 at 1:41 PM, Michael Gogins > >> >> wrote: > >> >>> > >> >>> You are aware of the linear algebra opcodes that I recently contributed > >> >>> to > >> >>> Csound? > >> >>> > >> >>> They don't have this kind of range indexing, but that could be added. > >> >>> > >> >>> I will be adding a manual page for these opcodes soon. In the meantime, > >> >>> you > >> >>> can look at tests/test24.csd, and the source code (the header of the > >> >>> Opcodes/linear_algebra.cpp documents it pretty well). > >> >>> > >> >>> Regards, > >> >>> Mike > >> >>> > >> >>> > >> >>> Steven Yi wrote: > >> >>>> > >> >>>> Hi Dave, > >> >>>> > >> >>>> You could make a UDO that does something like: > >> >>>> > >> >>>> foo itable 1, 3, 6 > >> >>>> > >> >>>> (though probably better to use an opcode name that doesn't start with > >> >>>> i). The 3 and 6 could be a start/end index. > >> >>>> > >> >>>> Not quite the same syntax, but technically equivalent. > >> >>>> > >> >>>> steven > >> >>>> > >> >>>> > >> >>>> > >> >>>> On Fri, May 30, 2008 at 6:48 AM, David Akbari wrote: > >> >>>>> > >> >>>>> Hi List, > >> >>>>> > >> >>>>> I'm wondering how one might go about using features similar to GNU > >> >>>>> Octave (or MATLAB) in Csound such as table indexing using the colon > >> >>>>> notation... For example, > >> >>>>> > >> >>>>> If we had the table > >> >>>>> itable ftgen 1, 0, 8, 2, 10, 13, 11, 14, 12, 16, 20, 9 > >> >>>>> > >> >>>>> How could we index a _range_ of values? Is the only current way to use > >> >>>>> Istvan's *_loop opcodes? > >> >>>>> > >> >>>>> Ideally, it would be nice in the above example to say something like > >> >>>>> > >> >>>>> foo = itable(1,3:6) > >> >>>>> > >> >>>>> where foo would in this case store values 3 through 6 in row 1 as a > >> >>>>> new table. Is there a way to encapsulate this type of syntax into a > >> >>>>> UDO? > >> >>>>> > >> >>>>> > >> >>>>> > >> >>>>> Thank you for your time and consideration, > >> >>>>> > >> >>>>> David Akbari > >> >>>>> > >> >>>>> > >> >>>>> Send bugs reports to this list. > >> >>>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body > >> >>>>> "unsubscribe > >> >>>>> csound" > >> >>>>> > >> >>>> > >> >>>> > >> >>>> Send bugs reports to this list. > >> >>>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > >> >>>> csound" > >> >>>> > >> >>>> > >> >>> > >> >>> -- > >> >>> View this message in context: > >> >>> http://www.nabble.com/Indexing-vectors-and-colon-notation--tp17559321p17567559.html > >> >>> Sent from the Csound - General mailing list archive at Nabble.com. > >> >>> > >> >>> > >> >>> > >> >>> Send bugs reports to this list. > >> >>> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > >> >>> csound" > >> >>> > >> >> > >> >> > >> >> Send bugs reports to this list. > >> >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > >> >> csound" > >> > > >> > > >> > > >> > Send bugs reports to this list. > >> > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe > >> > csound" > >> > > >> > >> > >> Send bugs reports to this list. > >> To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > >> > > > > > > Send bugs reports to this list. > > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" > > > > > Send bugs reports to this list. > To unsubscribe, send email sympa@lists.bath.ac.uk with body "unsubscribe csound" >