jeanluct / braidlab

Matlab package for analyzing data using braids
GNU General Public License v3.0
23 stars 9 forks source link

Changed exception ID in Matlab 2016b #137

Closed jeanluct closed 7 years ago

jeanluct commented 7 years ago

I was testing 2016b, which supports gcc-4.9, and got an error in the testsuite:

Running databraidTest

================================================================================
Verification failed in databraidTest/test_databraid_constructor.

    ---------------------
    Framework Diagnostic:
    ---------------------
    verifyError failed.
    --> The function threw the wrong exception.

        Actual Exception:
            'MATLAB:TooManyInputs'
        Expected Exception:
            'MATLAB:maxrhs'

    Actual Error Report:
        Error using braidlab.databraid
        Too many input arguments.

        Error in databraidTest>@()databraid(1,1,1,1) (line 50)
              testCase.verifyError(@() databraid(1,1,1,1), ...
    Evaluated Function:
            @()databraid(1,1,1,1)

    ------------------
    Stack Information:
    ------------------
    In /home/jeanluc/Projects/articles/braidlab/testsuite/testcases/databraidTest.m (databraidTest.test_databraid_constructor) at 50
================================================================================
........
Done databraidTest

Seems the exception is now called MATLAB:TooManyInputs rather than MATLAB:maxrhs. This should be an easy fix: we just accept both exceptions.

jeanluct commented 7 years ago

Ok, fixed it. Had to check for Matlab version number. A bit kludgy but it's just in the testsuite.