Cody

Solution 2265872

Submitted on 9 May 2020
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   Pass
filetext = fileread('eyeSquared.m'); assert(isempty(strfind(filetext, 'regexp')),'regexp hacks are forbidden')

2   Fail
n = 0; I_correct = []; assert(isequal(eyeSquared(n),I_correct))

I=[]

Output argument "I" (and maybe others) not assigned during call to "eyeSquared". Error in Test2 (line 3) assert(isequal(eyeSquared(n),I_correct))

3   Fail
n = 1; I_correct = 1; assert(isequal(eyeSquared(n),I_correct))

I=[]

Output argument "I" (and maybe others) not assigned during call to "eyeSquared". Error in Test3 (line 3) assert(isequal(eyeSquared(n),I_correct))

4   Fail
n = 4; I_correct = [1 0; 0 1]; assert(isequal(eyeSquared(n),I_correct))

I=[]

Output argument "I" (and maybe others) not assigned during call to "eyeSquared". Error in Test4 (line 3) assert(isequal(eyeSquared(n),I_correct))

5   Pass
n = 9; I_correct = [1 0 0; 0 1 0; 0 0 1]; assert(isequal(eyeSquared(n),I_correct))

6   Fail
n = -9; I_correct = []; assert(isequal(eyeSquared(n),I_correct))

I=[]

Output argument "I" (and maybe others) not assigned during call to "eyeSquared". Error in Test6 (line 3) assert(isequal(eyeSquared(n),I_correct))

7   Fail
n = 10; I_correct = []; assert(isequal(eyeSquared(n),I_correct))

I=[]

Output argument "I" (and maybe others) not assigned during call to "eyeSquared". Error in Test7 (line 3) assert(isequal(eyeSquared(n),I_correct))

8   Fail
n = 4.1; I_correct = []; assert(isequal(eyeSquared(n),I_correct))

I=[]

Output argument "I" (and maybe others) not assigned during call to "eyeSquared". Error in Test8 (line 3) assert(isequal(eyeSquared(n),I_correct))