So lets say I have some points $A,B,C$.
A method I have been shown for determining if the lie along a straight line is thus:
$\mathrm{If}\space|AC|=|AB|+|BC| \space\mathrm{then\space A,B\space and\space C\space lie\space on\space a\space straight\space line. }$
However, this doesn't seem like a very reliable method to me. It seems like a situation such as this would create a false positive.

If this is not the case, how do you prove that $|AB|+|BC|\neq|AC|$ in all cases if they points are not on a straight line?
If this case will indeed cause the algorithm to fail, what reliable algorithm can I use?
Thanks...
EDIT:: Whenever I built a triangle that would cause this algorithm to fail, (ie, a=10,b=5,c=5 and others) I get $cos{C}=1$, implying a straight, line? How can one prove this is always the case?
A little extension makes the algorithm work :
Consider $|AB|$ , $|AC|$ and $|BC|$. Then, C is on the line AB , if and only if the greatest of the three numbers is the sum of the others. In Particular, if C = A or C = B, then C is trivially always on the line AB.