/[ascend]/trunk/test.py
ViewVC logotype

Diff of /trunk/test.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1028 by johnpye, Wed Jan 3 13:26:54 2007 UTC revision 1032 by johnpye, Thu Jan 4 01:51:38 2007 UTC
# Line 218  class TestLSODE(Ascend): Line 218  class TestLSODE(Ascend):
218          assert abs(M.F - 21.36) < 0.1          assert abs(M.F - 21.36) < 0.1
219    
220  #-------------------------------------------------------------------------------  #-------------------------------------------------------------------------------
221  # Testing of a simple external function  # Testing of a external blackbox functions
222    
223    class TestBlackBox(AscendSelfTester):
224        def testparsefail0(self):
225            try:
226                self.L.load('test/blackbox/parsefail0.a4c')
227                self.fail("parsefail0 should not have loaded without errors")
228            except:
229                pass
230    
231        def testparsefail1(self):
232            try:
233                self.L.load('test/blackbox/parsefail1.a4c')
234                self.fail("parsefail1 should not have loaded without errors")
235            except:
236                pass
237    
238        def testparsefail2(self):
239            try:
240                self.L.load('test/blackbox/parsefail2.a4c')
241                self.fail("parsefail2 should not have loaded without errors")
242            except:
243                pass
244    
245        def testparsefail3(self):
246            try:
247                self.L.load('test/blackbox/parsefail3.a4c')
248                self.fail("parsefail3 should not have loaded without errors")
249            except:
250                pass
251    
252        def testparsefail4(self):
253            try:
254                self.L.load('test/blackbox/parsefail4.a4c')
255                self.fail("parsefail4 should not have loaded")
256            except:
257                pass
258    
259        def testfail1(self):
260            """Mismatched arg counts check-- tests bbox, not ascend."""
261            self.L.load('test/blackbox/fail1.a4c')
262            M = self.L.findType('fail1').getSimulation('sim')
263            M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())
264    
265        def testfail2(self):
266            """Incorrect data arg check -- tests bbox, not ascend"""
267            self.L.load('test/blackbox/fail2.a4c')
268            M = self.L.findType('fail2').getSimulation('sim')
269            M.solve(ascpy.Solver("QRSlv"),ascpy.SolverReporter())
270    
271        def testpass1(self):
272            """simple single bbox forward solve"""
273            M = self._run('pass1',filename='test/blackbox/pass.a4c')
274    
275        def testpass2(self):
276            """simple single bbox reverse solve"""
277            M = self._run('pass2',filename='test/blackbox/pass.a4c')
278    
279        def testpass3(self):
280            """simple double bbox solve"""
281            M = self._run('pass3',filename='test/blackbox/pass3.a4c')
282    
283        def testpass4(self):
284            """simple double bbox reverse solve"""
285            M = self._run('pass4',filename='test/blackbox/pass3.a4c')
286    
287        def testpass5(self):
288            M = self._run('pass5',filename='test/blackbox/pass5.a4c')
289    
290        def testpass6(self):
291            M = self._run('pass6',filename='test/blackbox/pass5.a4c')
292    
293        def testpass7(self):
294            M = self._run('pass7',filename='test/blackbox/passmerge.a4c')
295    
296        def testpass8(self):
297            M = self._run('pass8',filename='test/blackbox/passmerge.a4c')
298    
299        def testpass9(self):
300            M = self._run('pass9',filename='test/blackbox/passmerge.a4c')
301    
302        def testpass10(self):
303            M = self._run('pass10',filename='test/blackbox/passmerge.a4c')
304    
305        def testpass11(self):
306            M = self._run('pass11',filename='test/blackbox/passmerge.a4c')
307    
308        def testpass12(self):
309            M = self._run('pass12',filename='test/blackbox/passmerge.a4c')
310    
311        def testpass13(self):
312            """cross-merged input/output solve"""
313            M = self._run('pass13',filename='test/blackbox/passmerge.a4c')
314    
315        def testpass14(self):
316            """cross-merged input/output reverse solve"""
317            M = self._run('pass14',filename='test/blackbox/passmerge.a4c')
318    
319        def testpass20(self):
320            M = self._run('pass20',filename='test/blackbox/passarray.a4c')
321    
322        def testparsefail21(self):
323            """dense array of black boxes wrong syntax"""
324            try:
325                self.L.load('test/blackbox/parsefail21.a4c')
326                self.fail("parsefail21 should not have loaded without errors")
327            except:
328                pass
329    
330        def testpass22(self):
331            M = self._run('pass22',filename='test/blackbox/passarray.a4c')
332    
333        def testpass23(self):
334            M = self._run('pass23',filename='test/blackbox/passarray.a4c')
335    
336        def testpass61(self):
337            M = self._run('pass61',filename='test/blackbox/reinstantiate.a4c')
338    
339        def testpass62(self):
340            M = self._run('pass62',filename='test/blackbox/reinstantiate.a4c')
341    
342        def testpass64(self):
343            M = self._run('pass64',filename='test/blackbox/reinstantiate.a4c')
344    
345        def testpass65(self):
346            M = self._run('pass65',filename='test/blackbox/reinstantiate.a4c')
347    
348        def testpass66(self):
349            M = self._run('pass66',filename='test/blackbox/reinstantiate.a4c')
350    
351        def testpass67(self):
352            M = self._run('pass67',filename='test/blackbox/reinstantiate.a4c')
353    
354  class TestExtFn(AscendSelfTester):  class TestExtFn(AscendSelfTester):
355      def testextfntest(self):      def testextfntest(self):
# Line 252  class TestExtPy(AscendSelfTester): Line 383  class TestExtPy(AscendSelfTester):
383  #-------------------------------------------------------------------------------  #-------------------------------------------------------------------------------
384  # Testing of freesteam external steam properties functions  # Testing of freesteam external steam properties functions
385    
386  with_freesteam = False  with_freesteam = True
387  try:  try:
388      import freesteam      import freesteam
389      have_freesteam = True      have_freesteam = True

Legend:
Removed from v.1028  
changed lines
  Added in v.1032

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22