Main Content

Verify Generated Code and Deployed Code Artifacts

Verify generated C/C++ code and deployed code artifacts by using equivalence tests

With MATLAB® Test™, you can verify generated C/C++ code and deployed code artifacts by using equivalence tests, which are also referred to as back-to-back tests.

Author equivalence tests that generate C/C++ code by using MATLAB Coder™ and verify that the generated code is functionally equivalent to the MATLAB source code. If you have Embedded Coder®, you can measure the coverage of your generated C/C++ code when you run your equivalence tests.

Alternatively, you can author equivalence tests that generate deployed code artifacts by using MATLAB Compiler SDK™, including Java® and Python® packages and .NET assemblies, and test for equivalence.

Classes

matlabtest.coder.TestCaseTest case for generated C/C++ equivalence tests
matlabtest.coder.MATLABCoderTesterFormal tester for generated C/C++ equivalence tests
matlabtest.compiler.TestCaseTest case for deployed code artifact equivalence tests

Functions

expand all

build (coder.TestCase)Generate C/C++ code in equivalence tests
execute (coder.TestCase)Execute generated C/C++ code in equivalence tests
verifyExecutionMatchesMATLAB (coder.TestCase)Verify that generated C/C++ code execution results match MATLAB results
build (MATLABCoderTester.TestCase)Generate C/C++ code in formal equivalence tests
execute (MATLABCoderTester.TestCase)Execute generated C/C++ code in formal equivalence tests
build (compiler.TestCase)Generate deployed code artifacts in equivalence tests
execute (compiler.TestCase)Execute deployed code artifacts in equivalence tests
verifyExecutionMatchesMATLAB (compiler.TestCase)Verify that deployed code artifact execution results match MATLAB results

Topics