createSandbox
Syntax
success = createSandbox
createSandbox("Overwrite",overwrite_option)
Description
creates a sandbox folder and
subfolders, and returns true if the method successfully
creates a sandbox. The folder name is success = createSandbox<LibraryFileName>_sandbox, where
LibraryFileName is the LibraryFileName property of the
sltest.CodeImporter object. This method applies only if the
TestType property of the sltest.CodeImporter object is
UnitTest.
The created folder subdirectories are:
autostub— Contains theauto_stub.handauto_stub.cfiles, which are generated only if the imported code has undefined symbols.manualstub— Contains theman_stub.handman_stub.cfiles, which you can use to manually stub symbols. Theman_stub.hheader file includes the aggregated header if theModeproperty setting ofsltest.CodeImporter.SandboxSettingsisGenerateAggregatedHeader.include— Contains the header files required by the sandbox. This folder also contains a generatedaggregatedHeader.horinterfaceHeader.hfile. AnaggregatedHeader.hfile is generated if theModeproperty setting ofsltest.CodeImporter.SandboxSettingsisGenerateAggregatedHeader. Otherwise, the folder contains aninterfaceHeader.hfile.src— Contains copies of the code source files if theCopySourceproperty of thesltest.CodeImporter.SandboxSettingsobject istrue.
createSandbox("Overwrite",
overwrites the existing sandbox. If overwrite_option)overwrite_option is
"on", the method deletes the existing sandbox directory and creates a new
sandbox directory. If overwrite_option is "off", the
method deletes all folders except
manualstub and generates a new sandbox. The method does not change the
manualstub folder or its contents. The default is
"off".
Output Arguments
Examples
Version History
Introduced in R2021a