This is for desperate situations only.
Is it rotten?
If it is slimy or looks as if fungus or another type of parasite is eating it then don't eat it, you're not that desperate yet.
Bitter almond smell
Crush a bit of the plant and take a whiff, if it smells like peaches or bitter almond, discard it as it is most likely poison.
Skin rash
A good test, though one that may take a couple days, is to rub the plant on a section of arm or leg and see if you get a rash or whatnot. Rash = don't eat.
Cook
When you're initially trying to figure out if you can eat it or not, cook it.
Tasting the most likely poisonous substance
No rash, not rotten and it doesn't smell like poison? Cook it. Put a small bit in your mouth. Bitterness is a bad sign. Burning of the tongue and mouth is a bad sign. Feeling like you're going to vomit is a bad sign. If none of these things are present, eat a small amount and wait several hours. If you don't die or feel terrible and you're still desperate then, my friend, you have found something to eat. Increase portion sizes slowly.
If you feel a sharp pain, drink warm water and don't eat anything until the pain subsides. If you become very sick and are near a fire pit crush up some charcoal and eat it. This will make you vomit and help neutralize the poison.
Hey, good luck champ, you're gonna make it.
How to drink urine to survive
Wild plants you shouldn't eat
edible flowers
How to find north