Essentially what happened is that you didn't initialize your array (neither your i and j flags).
When one doesn't initialize a variable and it was declared on the global scope, it gets initialized for us. On the case of ints, they get the value 0. So, your array was populated with all 0's. Which means all elements are equal. Your test could not possibly fail.