From: eficas <> Date: Tue, 28 Feb 2006 11:30:48 +0000 (+0000) Subject: ajout tests parametres X-Git-Tag: merge_mars_06~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=a1474d85fb5678b026e28a06dec3f4afcbb5eb94;p=modules%2Feficas.git ajout tests parametres --- diff --git a/Tests/testelem/params.comm b/Tests/testelem/params.comm index 1745633a..dba52390 100644 --- a/Tests/testelem/params.comm +++ b/Tests/testelem/params.comm @@ -13,6 +13,8 @@ x = (1, 2); y = [3, 4]; +y2 = (y * 2); + z = 'a'; zz = 'v'; @@ -22,5 +24,17 @@ t = a; v = """aaaa bbbb"""; +xx = ceil(sqrt(d)); + +yy = cos(3.1); + +ax = sin(2); + +bx = cos(xx); + +cx = sin(xx); + +zy = y[1]; + FIN(); diff --git a/Tests/testelem/testjdc1.py b/Tests/testelem/testjdc1.py index 6f2011f8..3d57d649 100644 --- a/Tests/testelem/testjdc1.py +++ b/Tests/testelem/testjdc1.py @@ -32,6 +32,21 @@ class TestCase(unittest.TestCase): def tearDown(self): CONTEXT.unset_current_step() + def test000(self): + app=appli.STANDALONE(version='v8.2') + j=app.newJDC() + +# commande DEBUT + co=j.addentite("DEBUT",0) + co=add_param(j,1,"P1",None) + x=co.valeur or "coucou" + assert x == "coucou" + assert len(co) == 0 + co.set_valeur(1) + assert len(co) == 1 + co.set_valeur([1,2]) + assert len(co) == 2 + def test001(self): """ Test d'insertion de commandes dans fichier toto.comm""" app=appli.STANDALONE(version='v8.2') diff --git a/Tests/testelem/testsimp3.py b/Tests/testelem/testsimp3.py index 85a10ee4..3d6caeec 100644 --- a/Tests/testelem/testsimp3.py +++ b/Tests/testelem/testsimp3.py @@ -72,3 +72,6 @@ class TestSimpCase(unittest.TestCase): self.assertEqual(o.isvalid(),valid,"erreur sur le test %s %s" % (valeur,valid)+'\n'+str(o.report())) if valid: self.assertEqual(o.get_valeur(),valeur) + def test005(self): + t=Variable('t',None) + assert len(t) == 0