A love triangle, the best-friend theory, and a test of friendship no one wants to face in real life—in a romantic comedy that makes you think.