mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Add a regression test for a case that failed before the globals fix.
This commit is contained in:
parent
8907a59d5f
commit
ae94e80c34
1 changed files with 9 additions and 0 deletions
|
@ -266,6 +266,15 @@ class Test03_Optimizer(UnitTestCase):
|
|||
self.opt.optimize(p, self.parser.functions)
|
||||
print self.outscript.output(p)
|
||||
|
||||
def test_regression(self):
|
||||
p = self.parser.parse('''
|
||||
integer a;
|
||||
x() { if (1) { string s = "x"; s = s + (string)a; } }
|
||||
default { timer() { } }
|
||||
''', ['extendedassignment'])
|
||||
self.opt.optimize(p, self.parser.functions)
|
||||
self.outscript.output(p)
|
||||
|
||||
def tearDown(self):
|
||||
del self.parser
|
||||
del self.opt
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue