这个问题很棘手!更好地添加更多测试用例和重新核。例如,'AAA BB'
好的
测试套件
测试状态代码输入和输出
1失败
instr ='我们不是原因为什么';
outstr_correct ='我们不是原因为什么';
断言(Isequal(remove_small_words(ortr),outstr_correct))
outstr =
'我们不是理由为什么'
断言失败了。
2失败
instr ='成为或不成为这个问题';
outstr_correct ='不是这个问题';
断言(Isequal(remove_small_words(ortr),outstr_correct))
outstr =
“不是那个问题”
断言失败了。
3失败
instr ='他是一个肮脏的所以“;
outstr_correct ='脏和';
断言(Isequal(remove_small_words(ortr),outstr_correct))
outstr =
'肮脏和'
断言失败了。
4通过
instr ='哦,我哦,我';
outstr_correct ='';
断言(Isequal(remove_small_words(ortr),outstr_correct))
outstr =
0×0空字符数组
断言在这里有什么问题?
不确定,为什么这失败,在我的本地Matlab上传递(8.3.0.532(R2014A))
这对'AAA'无法正常工作
这并不总是有效。