Coverage for skema/program_analysis/CAST/matlab/tests/test_matrix.py: 100%

7 statements  

« prev     ^ index     » next       coverage.py v7.5.0, created at 2024-04-30 17:15 +0000

1from skema.program_analysis.CAST.matlab.tests.utils import (check, cast) 

2 

3# Test CAST using matrices 

4def test_empty(): 

5 """ Test empty matrix.""" 

6 check(cast("[];")[0], []) 

7 

8def test_booleans(): 

9 """ Test matrix with MATLAB booleans.""" 

10 check(cast("[true false];")[0], ["True", "False"]) 

11 

12def test_values(): 

13 """ Test assignment 1 dimensional matrix value.""" 

14 check(cast("[1 x 'Bob' ]")[0], [1, 'x', "'Bob'"]) 

15