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 (Since R2023a)
matlabtest.coder.MATLABCoderTesterFormal tester for generated C/C++ equivalence tests (Since R2023a)
matlabtest.compiler.TestCaseTest case for deployed code artifact equivalence tests (Since R2023a)
matlabtest.coder.plugins.GeneratedCodeCoveragePluginPlugin for code coverage information for generated C/C++ code equivalence tests (Since R2023a)

Functions

expand all

buildGenerate C/C++ code in equivalence tests (Since R2023a)
executeExecute generated C/C++ code in equivalence tests (Since R2023a)
verifyExecutionMatchesMATLABVerify that generated C/C++ code execution results match MATLAB results (Since R2023a)
buildGenerate C/C++ code in formal equivalence tests (Since R2023a)
executeExecute generated C/C++ code in formal equivalence tests (Since R2023a)
buildGenerate deployed code artifacts in equivalence tests (Since R2023a)
executeExecute deployed code artifacts in equivalence tests (Since R2023a)
verifyExecutionMatchesMATLABVerify that deployed code artifact execution results match MATLAB results (Since R2023a)

Topics