Cody

Solution 1538064

Submitted on 23 May 2018
This solution is locked. To view this solution, you need to provide a solution of the same size or smaller.

Test Suite

Test Status Code Input and Output
1   Fail
delim_str = 'apple pear'; str1 = 'apple'; assert(isequal(your_fcn_name(delim_str),str1))

str1 = 1×1 cell array {'apple '} str1 = 'apple '

Assertion failed.

2   Fail
delim_str = 'apple pear pineapple'; str1 = 'apple'; assert(isequal(your_fcn_name(delim_str),str1))

str1 = 1×1 cell array {'apple pear '} str1 = 'apple pear '

Assertion failed.

3   Fail
delim_str = 'one'; str1 = 'one'; assert(isequal(your_fcn_name(delim_str),str1))

str1 = 0×0 empty cell array

Index exceeds array bounds. Error in your_fcn_name (line 3) str1 = str1{1} Error in Test3 (line 3) assert(isequal(your_fcn_name(delim_str),str1))

4   Fail
delim_str = 'one two three'; str1 = 'one'; assert(isequal(your_fcn_name(delim_str),str1))

str1 = 1×1 cell array {'one two '} str1 = 'one two '

Assertion failed.

5   Fail
delim_str = '123 456'; str1 = '123'; assert(isequal(your_fcn_name(delim_str),str1))

str1 = 1×1 cell array {'123 '} str1 = '123 '

Assertion failed.

6   Fail
delim_str = '123456'; str1 = '123456'; assert(isequal(your_fcn_name(delim_str),str1))

str1 = 0×0 empty cell array

Index exceeds array bounds. Error in your_fcn_name (line 3) str1 = str1{1} Error in Test6 (line 3) assert(isequal(your_fcn_name(delim_str),str1))