As user2357112 noted, you have rejected some valid cases, such as 11, 5, 9: that still permits 6+5 as a solution.

You have also failed to reject an invalid case due to integer division, such as 11, 2, 5, where n == 2*r + 1; however, in these cases, your calculations naturally return 0.
I'm wrong here: r + r < n will catch this case, but this means that your r < (n/2) case is redundant

If you still have trouble with your testing, please include your test classes and test vectors (input sets).