MAJ terminée. Nous sommes passés en version 14.6.2 . Pour consulter les "releases notes" associées c'est ici :

https://about.gitlab.com/releases/2022/01/11/security-release-gitlab-14-6-2-released/
https://about.gitlab.com/releases/2022/01/04/gitlab-14-6-1-released/

Commit e1244abd authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[lib][tests] Raise an exception in case of error... it's better for unit tests... :/

parent e87913fa
......@@ -196,7 +196,7 @@ class TestExpressionAnalyzer(unittest.TestCase):
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for default")
self.assert_(False, "Compiler error for default")
exp10 = SigDefaultExpr(self.exp1, self.exp2) # X1 default X2
exp101 = SigDefaultExpr(exp10, self.exp3) #( X1 default X2) default X3
......@@ -217,8 +217,8 @@ class TestExpressionAnalyzer(unittest.TestCase):
try:
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
#parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for when")
parser.displayExceptionMessage(exc)
self.assert_(False, "Compiler error for when")
exp11 = SigWhenExpr(self.exp3, self.exp4) # X3 when X4
exp111 = SigWhenExpr(exp11, self.exp2) # (X3 when X4) when X2
res = exp111.test_equal(exp_obj.exp)
......@@ -238,8 +238,8 @@ class TestExpressionAnalyzer(unittest.TestCase):
try:
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
#parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for default_when")
parser.displayExceptionMessage(exc)
self.assert_(False, "Compiler error for default_when")
exp11 = SigWhenExpr(self.exp3, self.exp4) # X3 when X4
exp112 = SigDefaultExpr(self.exp1, exp11) # X1 default (X3 when X4)
res = exp112.test_equal(exp_obj.exp)
......@@ -260,8 +260,8 @@ class TestExpressionAnalyzer(unittest.TestCase):
try:
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
#parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for void")
parser.displayExceptionMessage(exc)
self.assert_(False, "Compiler error for void")
expv = SigConstExpr(True)
res = expv.test_equal(exp_obj.exp)
mess = "Error in void expression - must default to True"
......@@ -287,8 +287,8 @@ class TestExpressionAnalyzer(unittest.TestCase):
try:
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
#parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for when")
parser.displayExceptionMessage(exc)
self.assert_(False, "Compiler error for when")
exp11 = SigSyncBinExpr('or', self.exp4, self.exp2) # X4 or X2
exp111 = SigWhenExpr(self.exp3, exp11) # X3 when (X4 or X2)
res = exp111.test_equal(exp_obj.exp)
......@@ -320,7 +320,7 @@ class TestExpressionAnalyzer(unittest.TestCase):
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for when")
self.assert_(False, "Compiler error for when")
# False if no error (display() method is never called)
# X3 has a type 'emit' but state_only is not activated
......@@ -351,7 +351,7 @@ class TestExpressionAnalyzer(unittest.TestCase):
exp_obj = parser.sig_expression(self.tab)
except RecognitionException as exc:
parser.displayExceptionMessage(exc)
self.assert_(True, "Compiler error for when")
self.assert_(False, "Compiler error for when")
# False if no error (display() method is never called)
# Here, res is True because X3 has a type 'emit': not 'state' or 'input'
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment