帮助中心帮助中心
本页采用了机器翻译。点击此处可查看英文原文。
类: sltest.TestCase 命名空间: sltest
创建用于交互使用的测试用例
自 R2020b 起
testCase = sltest.TestCase.forInteractiveUse
示例
testCase = sltest.TestCase.forInteractiveUse 返回一个配置为在 MATLAB 命令行上交互使用的测试用例实例。在 MATLAB 命令行使用此方法来调试 TestCase 对象,而无需编写完整的测试文件。您不能在测试文件中使用此方法。
testCase
TestCase
全部展开
sltest.TestCase
测试用例的实例,作为 sltest.TestCase 对象返回。此实例配置为将资格失败和成功打印到标准输出,通常是屏幕。
Static
yes
要了解方法的属性,请参阅方法属性。
testCase =... sltest.TestCase.forInteractiveUse; expected = testCase.simulate('myModel',... 'SimulationMode','Normal'); actual = testCase.simulate('myModel',... 'SimulationMode','Rapid-Accelerator'); testCase.verifySignalsMatch(actual,expected)
在 R2020b 中推出
sltest.TestCase | assertSignalsMatch | fatalAssertSignalsMatch | assumeSignalsMatch | verifySignalsMatch
assertSignalsMatch
fatalAssertSignalsMatch
assumeSignalsMatch
verifySignalsMatch
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Contact your local office